* 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 `PartialModelTrait` for a part of model
re-export `PartialModelTrait`
cargo fmt
add fn`into_partial_model` on `Select`&`SelectTwo`
add `DerivePartialModel` to impl `PartialModel`
add macro `DerivePartialModel` to `sea-orm`
disambiguate `SelectColumns` function
fix macro error
cargo fmt && cargo clippy
move `SelectColumns` from helper.rs to traits.rs
cargo fmt
Reduce nest hell of load attribute argument fetch
✅ test `DerivePartialModel` input parse
`DerivePartialModel` not derive with generic
fix `DerivePartialModel` code generate error
remove unused use
cargo fmt
add `into_partial_model` for `SelectTwoMany`
* Support Vector of enum for Postgres
* Fix clippy
* Add tests for integer array
* Fix dependency
* Bump sea-query to 0.27.2
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
* Implement `IntoActiveValue` for `time` types.
I tried to implement a [custom active
model](https://www.sea-ql.org/SeaORM/docs/advanced-query/custom-active-model/),
and one of the columns was `Option<TimeDateTimeWithTimeZone>`. I got a
compiler error:
```
error[E0277]: the trait bound `std::option::Option<sea_orm::prelude::TimeDateTimeWithTimeZone>: IntoActiveValue<_>` is not satisfied
```
Looking into the source code, it seemed a simple oversight that this
trait was implemented for the `chrono` types but not the `time` types,
and it was easy enough to fix since there's already a macro to implement
it for new types.
I also noticed that the `time` types are not accounted for in
`src/query/json.rs` while the `chrono` types are, which I assume is also
an oversight. However, I don't have a need for that at this point and
the fix for that seemed less trivial, so I'm just bringing it to your
attention.
Thanks for SeaORM!
* Implement `IntoActiveValue` for `Vec<u8>` types
* Add tests to double check and prevent it from happening again
* Add docs
* Fixup
* Serialize `time` types as `serde_json::Value`
Co-authored-by: Jimmy Cuadra <jimmy@jimmycuadra.com>
* Bump version of sqlx, sea-query, sea-schema, time and uuid
* PostgreSQL `u32` was wrapped in `Oid` (launchbadge/sqlx#1602)
* Update test cases
* Fix clippy warnings
* cargo fmt
* Fix clippy warnings
* Bump sea-schema to ^0.9.2
* Update test cases
* Pin on sea-query minor version