* WIP
* WIP
* test cases for cursor with SelectTwo
* fmt, fix test
* WIP, missing test for also_linked cursor_by
* completed many_to_many relationship
* test fixup
* fmt
* extra order_by to fix test
* WIP
* fixed cursor_by to do ordering implicitly base on both cursor column and primary key from other table
* change from map to for loop to eagerly do order_by
* fix tests
* adds find_with_linked test
* WIP(related test)
* mock related test done
* complete relation test
* loader update
* find_with/also_related missing test case for empty from other side
* comments fixup
* revert loader test
* related select test done
* find with/also linked test cases
* removed due to it being functionally same as the new one
* fmt, remove excess import
* improved model generation
* issue related test case #1790
* added loader test cases and slight improvement to find_related/linked
* miscellaneous changes
* added empty insert, merge load_one test case
* completed loader many to many test case, fmt
* removed empty_insert test case for now
* commented insert_test
* added Cargo.toml for issue 1790's folder
* buffed salvo version for ci(0.49 yanked)
* revert version for salvo example
* Add Support For PostgreSQL Arrays In FromQueryResult Implementation Of JsonValue
* Add support for root arrays in JSON in SeaORM #1517
* Refactoring
* Only when `postgres-array` is enabled
* Add test cases
---------
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
* Add default_expr support for ColumnDef
* added test for attribute `default_value`
* Implements `PartialEq` for `sea_query::SimpleExpr`
* RcOrArc
* Re-export `sea_query::Expr` in `sea_orm::entity::prelude`
* Add default_expr support for ColumnDef
* added test for attribute `default_value`
* Implements `PartialEq` for `sea_query::SimpleExpr`
* RcOrArc
* Re-export `sea_query::Expr` in `sea_orm::entity::prelude`
* Deprecate `ColumnDef::default_value()`
* Add `ColumnDef::default()`
---------
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
* WIP, implementing Iden
* completed implementation for DeriveIden and added basic test cases
* added feature flag to prevent sea-orm::sea-query::DeriveIden from crashing when sea-query is not used
* fixed doc test and adjusted test case
* enable `sea-query-derive`'s `sea-orm` feature
* Bump `sea-query-derive` to v0.4
* Update Cargo.toml
* Update Cargo.toml
* adjusted test cases and updated so that iden attribute will not be snake cased
* Update Cargo.toml
* Update main.rs
---------
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
* WIP
* WIP
* WIP
* changed from storing ident to storing TokenStream internally
* Push for code sharing
* fmt
* changing test target to string
* updated Display not showing extra single quote, fixed clippy
* removed DeriveDisplay for test case not using display trait
* added test cases for display_value attribute
* Remove useless clone
* Add comment
* Remove useless clone
* Rename method
* Refactoring
---------
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
* end-of-day commit (WIP)
* progress commit (WIP)
* refactored and added InsertAttempt
* async asjusting
* completed implementation for insertAttempt in execution
Added in tests for insertAttempt
* updated wording for new INSERT type
* removed InsertTrait
* Added enum for SQL Error and basic functions for it
* fmt
* Restructured code to allow multiple database system simultaneously
* updated code error and moved Eq to derive by compiler
* added ForeignKeyViolation implementation
* fmt
* added type param
* changed type param and used unwrap_or_default instead of unwrap
* fmt
* refactor code and update documentation
* updated some error code and fixed formatting
* create SQL Err test for UniqueConstraintViolation
* fmt
* updated error codes for mysql errors
* added test for ForeignKeyConstraintViolation and removed unused imports/codes
* fmt
* updated doc and error message
* added static str in SqlErr
* changed to add error message into SqlErr as String
* updated test file to check database type through connection
* fmt
* updated test for SqlErr to match the error type only
* Removed comment and fixed grammar mistake
* fmt
* Update src/error.rs
* Refactoring
---------
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
* Test suit load environment variable from env files
* Added expr() and exprs() for QuerySelect trait and Minor typo fix
* fmt
* Added doc testing for the new functions
* Remove excess comment for doc test
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
* Remove excess comment for doc test
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
* updated doc tests to make example more realistic
* changed doc test again for more realistic query and added expr_as()
* aligned expr_as() alias input with column_as() input
* update doc test for expr_as() according to previous changes
---------
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
* Add DeriveRelatedEntity macro
* Add generation for related enum and seaography
* Add seaography cli param
* update codegen tests
* Fix DeriveRelatedEntity macro doc and includes
* Fix all RelatedEntity variants for RelationBuilder
* Add tests for code
* Cargo format
* Fix clippy code
* Fix format
* Fix unit tests
* Fix unit tests
* Provide default for seaography::RelationBuilder
* Update changelog
* Update tests
* Modify code to match feedback
* Bring old Related Impl trait generation
* Modify DeriveRelatedEntity to gen impl seaography::RelationBuilder
* Generate RelatedEntity enum when seaography flag is enabled
* Update documentation
* Update Changelog
* Fix format errors
* Fix code generation
* relations with suffix are definition based
* Rev => Reverse easier to read
* snake_case to cameCase for name generation
* Fix unit tests
* Update lib.rs
* derive `seaography::RelationBuilder` only when `seaography` feature is enabled
* Try constructing async-graphql root for "related entity" and "entity" without relation
* Update demo
* CHANGELOG
* Update Cargo.toml
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
* Revert "Update Cargo.toml"
This reverts commit 6b1669836a4fb5040bfb08999f0cf640c74dc64d.
---------
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>