Chris Tsang
56e4b4337b
Improve API & Example
2023-02-02 11:21:00 +08:00
Chris Tsang
83c0732395
load_many_to_many
2023-02-02 09:38:30 +08:00
Chris Tsang
0670827148
Improve test cases
2023-02-02 07:46:38 +08:00
Chris Tsang
d8a2428f46
Fixup
2023-02-02 01:47:28 +08:00
Chris Tsang
d11998bf9e
More tests
2023-02-02 01:31:35 +08:00
Billy Chan
b21abf617f
Fix clippy warnings ( #1437 )
2023-01-31 16:46:44 +08:00
Billy Chan
4e3a45c2f7
Fix clippy warnings ( #1436 )
2023-01-31 15:52:57 +08:00
Billy Chan
a6bd91a78b
Use ActiveEnum
field as composite primary key ( #1414 )
...
* Use ActiveEnum field as part of composite primary key
* Try unique constraint failed
2023-01-30 21:47:49 +08:00
Billy Chan
08a5e87e22
Replace SeaORM's ColumnType
( #1395 )
...
* Replace SeaORM's `ColumnType`
* Bump SeaQuery's version
* Fix merge conflict
* refactor
2023-01-29 11:06:01 +08:00
Billy Chan
71dbffc725
Fix clippy ( #1426 )
...
* Fix clippy
* Fix clippy
2023-01-27 18:50:20 +08:00
Chris Tsang
b3e4d1c1cf
RecordNotFound -> RecordNotUpdated
2023-01-25 15:43:44 +08:00
Chris Tsang
5cdcdbfc1c
Add testcase
2023-01-19 01:38:03 +08:00
Chris Tsang
03207fbda9
Use rows_affected
when DB does not support returning
2023-01-18 21:18:04 +08:00
Billy Chan
e2b796b093
Cont. feat: expose database connection to ActiveModelBehaviour
's methods ( #1328 )
...
* feat: expose database connection to `ActiveModelBehaviour`'s methods (#1145 )
* Make ActiveModelTrait async
* Add tests
* refactoring
Co-authored-by: teenjuna <53595243+teenjuna@users.noreply.github.com>
2023-01-12 17:22:46 +08:00
Billy Chan
e9df3aa01d
Casting columns as a different data type on select, insert and update ( #1304 )
...
* Cast select and value
* Refactoring
* Test casting Postgres citext
* Fixup
* Revert
* Add test cases
* Fixup
* Rename methods
2023-01-12 14:56:11 +08:00
Billy Chan
c49a8ac843
Fix merge conflict ( #1386 )
...
* Fix merge conflict
* remove unnecessary clone
2023-01-11 15:27:34 +08:00
Billy Chan
cbd7a8d1c9
Cleanup the use of vec![]
( #1367 )
...
* Public methods accept any IntoIterator as argument
* refactoring
2023-01-11 14:17:06 +08:00
Billy Chan
b5e984ca4a
Postgres insert many will throw RecordNotInserted error if non of them are being inserted ( #1021 )
2023-01-11 14:16:35 +08:00
Billy Chan
4f5a15a99f
Support various UUID formats that are available in uuid::fmt
module ( #1325 )
...
* Support various UUID formats that are available in `uuid::fmt` module
* clippy
* fixup
2023-01-11 14:13:15 +08:00
Chris Tsang
4210526ec1
Merge pull request #1311 from SeaQL/select-into-tuple
...
Select into tuple
2023-01-10 15:20:14 +08:00
Chris Tsang
5c93253877
Tests
2023-01-09 14:46:19 +08:00
Billy Chan
e246d3faaf
Cont. Upgrade to SeaQuery 0.28.0 ( #1366 )
...
* Upgrade to SeaQuery 0.28.0
* Remove unnecessary heap allocation
* Upgrade sea-query-binder
* Upgrade sea-schema
* Fix
* Upgrade sea-schema
* refactoring
Co-authored-by: Ivan Krivosheev <py.krivosheev@gmail.com>
2023-01-05 20:41:28 +08:00
Billy Chan
e927a0e5f5
Execute unprepared statement ( #1327 )
2023-01-05 14:08:18 +08:00
Chris Tsang
eeec2cf06f
Merge pull request #1238 from karatakis/dataloader
...
[PIP] Simple data loader
2022-12-28 15:59:04 +08:00
Billy Chan
1135c117c3
fixup
2022-12-20 15:56:42 +08:00
Billy Chan
2f00a8757d
Merge branch 'master' into select-into-tuple
2022-12-20 15:51:06 +08:00
Billy Chan
d205338f3f
Try custom vector field ( #1273 )
2022-12-19 17:08:32 +08:00
Billy Chan
69eb4b8ea8
Refactor the use of deprecated chrono methods ( #1312 )
2022-12-16 18:14:25 +08:00
Billy Chan
0be16bad16
Add tests
2022-12-15 21:24:18 +08:00
Billy Chan
70c4a3a23e
Select into tuple
2022-12-15 21:24:10 +08:00
Billy Chan
7838782718
Transaction tests
2022-12-02 13:37:37 +08:00
Billy Chan
08cb44028e
Support bigdecimal::BigDecimal ( #1258 )
...
* Fix: fields with type `Option<T>` are always nullable
* Support BigDecimal
2022-12-01 12:53:19 +08:00
Panagiotis Karatakis
f3910c329b
Fix shared related item
2022-11-25 12:01:58 +02:00
Chris Tsang
45b391f434
Improve testcase
2022-11-23 23:47:14 +08:00
Chris Tsang
6c7a162f05
cargo fmt
2022-11-23 22:47:41 +08:00
Panagiotis Karatakis
4323a0cb07
Add integration tests
2022-11-22 13:46:22 +02:00
Billy Chan
4d8645ae8b
Support Vector of enum for Postgres ( #1210 )
...
* 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>
2022-11-15 13:50:05 +08:00
Billy Chan
73e56e5531
Filter rows with IS IN
enum values expression ( #1183 )
...
* [demo] filter rows with enum value is in list
* Fix clippy
2022-11-15 13:20:47 +08:00
Billy Chan
1be6673f0e
Fix DeriveActiveEnum expand enum variant starts with number ( #1219 )
2022-11-15 10:56:25 +08:00
Billy Chan
fdb3cff29f
SQLite support time
crate ( #995 )
...
* SQLite support `time` crate
* Serialize time types for SQLite query results
2022-10-27 14:35:39 +08:00
Billy Chan
b5b9790252
Support array datatype in PostgreSQL ( #1132 )
...
* PostgreSQL array (draft)
* Fixup
* Fixup
* Fixup
* Fixup
* Fixup
* Refactoring
* generate entity for Postgres array fields
* Add tests
* Update Cargo.toml
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-10-23 18:26:57 +08:00
Ivan Krivosheev
3219e6ff42
Merge branch 'master' into sea-query-v0.27
2022-10-17 21:50:48 +03:00
Billy Chan
a0fd72e635
Serialize time
types as serde_json::Value
( #1042 )
...
* 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>
2022-10-18 00:04:03 +08:00
Billy Chan
29da37b4f2
Merge branch 'master' into sea-query-v0.27
2022-10-17 17:53:41 +08:00
Billy Chan
671d79469a
Fixup
2022-10-17 17:25:35 +08:00
Billy Chan
e76cbb9fe1
Add into_model
& into_json
for Cursor
( #1112 )
2022-10-16 19:02:48 +08:00
wdcocq
880147c596
Blanket IntoActiveValue implementations so custom db types are supported ( #833 )
...
* Add blanket implementations of IntoActiveValue for optional values
* Add a compile test for DeriveIntoActiveModel
2022-10-11 23:47:17 +08:00
Chris Tsang
5d752e60b9
Merge pull request #1002 from SeaQL/better-errors
...
Better error system
2022-10-07 00:24:41 +08:00
Billy Chan
77bddd85a5
Fixup
2022-09-22 15:07:37 +08:00
Billy Chan
1035bbb431
Fixup
2022-09-15 16:44:31 +08:00