Billy Chan
75cb269ceb
Custom join on conditions ( #793 )
...
* Custom join on conditions
* Try lambda approach
* Implement debug for relation
* Add example without `rev`
* Add more examples
* Docs
2022-06-29 00:27:55 +08:00
Chris Tsang
12ec00272c
Revert "Cursor Pagination ( #754 )"
...
This reverts commit 6f9dbd260e6e004c369abe0019b4374253db7d3b.
2022-06-26 18:23:47 +08:00
Billy Chan
6f9dbd260e
Cursor Pagination ( #754 )
...
* Cursor pagination
* Apply filter / range filter on cursor; Allow non-primary key filter
* Fixup
* Update cursor API
* Cursor pagination with composite keys
* Docs
2022-06-26 17:48:00 +08:00
Chris Tsang
1609e4c743
Edit
2022-05-15 17:44:23 +08:00
Chris Tsang
c8851646e8
Fixup
2022-05-09 22:33:59 +08:00
Chris Tsang
2da0429f41
Changelog
2022-05-09 22:06:23 +08:00
Kirawi
23e95761ca
add is_changed to ActiveModelTrait ( #683 )
...
* add is_changed to ActiveModelTrait
* add test for `ActiveModelTrait::is_changed()`
2022-05-09 21:58:20 +08:00
Allen
bdd9133aa6
fix lints and warnings
...
also clean up impl_into_active_value macro
2022-04-09 16:52:47 -07:00
Shouvik Ghosh
12f66618f9
Added delete_by_id ( #590 )
...
* Added delete_by_id
* Added an integration test
* Added composite key example
* Remove extra find_by_id in delete_by_id test
* Added unit test with composite primary key
2022-03-21 14:41:05 +08:00
Chris Tsang
c28d77df6d
Merge branch 'master' into support-time-crate
2022-03-20 23:48:29 +08:00
Billy Chan
73701fef9a
Codegen Unsigned Integer - 2 ( #397 )
...
* feat: codegen unsigned integer
* feat: apply alias on `ColumnRef::SchemaTableColumn`
* Update SQLite test cases, quote identifier with double quotes
* Bump sea-query version to 0.22
* Add dummy line
* Tests [cli] and [issues]
* update sea-schema
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-03-14 12:40:02 +08:00
Billy Chan
351efd0d6b
Update ActiveModel by JSON ( #492 )
...
* Update ActiveModel by JSON
* Add `ActiveModel::from_json`
* Update test cases
2022-03-13 18:41:32 +08:00
Billy Chan
9687819a7e
Supports time
crate
2022-03-13 18:18:15 +08:00
Ken-Miura
483de17da8
Describe default value of ActiveValue on document ( #556 )
2022-03-02 12:24:49 +08:00
Billy Chan
8eb095385d
Migration ( #335 )
...
* Refactor `ConnectionTrait`
* Refactoring
* Build index & foreign key statements
* Fix imports
* Fixup
* Rocket example with migration
* async-std compatible with the tokio 1.0 runtime
* Use reexported dependency
* Compile without selecting any db backend
* Updating sea-orm-cli dep
* sea-orm-cli migrate commands
* cargo fmt
* Test [cli]
* Refactoring
* Clap app name should be "sea-orm-cli"
* Correctly capture MIGRATION_DIR
* Rename README
* Add `sea-orm-cli migrate init` command
* Update README
* Try restructured sea-query dependency (SeaQL/sea-schema#41 )
* Set `DATABASE_URL` environment variable
2022-02-05 20:34:54 +08:00
Chris Tsang
e63d463155
Merge pull request #489 from SeaQL/date-time-utc-local
...
Support `DateTime<Utc>` & `DateTime<Local>`
2022-02-01 15:25:39 +08:00
Billy Chan
8145088814
Refactoring
...
`ColumnDef` with default value
Cargo fmt
Update docs
Fixup
Support `DateTimeLocal`
Update docs
Codegen write db timestamp column as `DateTimeUtc` type
Update dependency
Merge branch 'sea-query/add-new-column-ref' into pr/429
feat: apply alias on `ColumnRef::SchemaTableColumn`
2022-02-01 14:29:03 +08:00
Charles Chege
52f38a10ea
Support the use of chrono::DateTime<Utc> in sea-orm
...
Add documentation for this
Temporarily use a fork to include new Sea-query code
Add tests for DateTimeUtc
Solve Github actions error by add the code to create a table
Assertion accuracy tests
Rectify incorrect format
2022-02-01 14:27:33 +08:00
Billy Chan
76c0d7fff5
Name conflict of foreign key constraints when two entities have more than one foreign keys ( #417 )
...
* fix: name conflict of foreign key constraints when two entities have more than one fk
* test: update test case's foreign keys
* feat: override default name of foreign key constraint
2022-01-28 01:03:24 +08:00
Billy Chan
0f5516b6bf
fix: support up to 6-ary composite primary key ( #423 )
2022-01-14 01:16:39 +08:00
Chris Tsang
6120d82924
cargo fmt
2021-12-26 00:36:33 +08:00
Chris Tsang
d5c9c65079
Revert save
to return Self
2021-12-26 00:13:56 +08:00
Chris Tsang
47cbf50c3c
Merge branch 'master' into pulls/361
2021-12-25 17:41:29 +08:00
Billy Chan
17631512bb
feat(Model): add wrapper method delete
2021-12-21 18:24:05 +08:00
Chris Tsang
09fd9ba725
Docs
2021-12-19 02:23:23 +08:00
Billy Chan
adfb9ead54
Rework ActiveValue
( #340 )
...
* WIP
* Fixup
* Fixup
* Update docs & rename `unset`
* Deprecate `Unset()` and reexport `ActiveValue::NotSet`
* Docs
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2021-12-19 02:22:30 +08:00
Billy Chan
5104cd3573
Insert & Update Return Model
( #339 )
...
* Update insert & update API
* Update test cases
* Update README
* Fix clippy warnings
* Fixup
* Fixup
2021-12-18 14:30:10 +08:00
Billy Chan
0f164b62d5
Fix related & linked with enum columns ( #376 )
...
* Fix related & linked with enum columns
* Add test cases
2021-12-10 23:41:43 +08:00
Billy Chan
af1ffdad83
Rename sea-strum
lib back to strum
2021-12-07 17:21:03 +08:00
Chris Tsang
0deedddf28
Merge pull request #292 from SeaQL/returning
...
Returning
2021-11-17 17:41:28 +08:00
Billy Chan
0f904e02f0
Refactoring
2021-11-17 10:38:02 +08:00
Billy Chan
cef51ddd3f
Use SeaQL/sea-query#188
2021-11-16 18:45:21 +08:00
Billy Chan
7298fdeda9
Rewrite doctests
2021-11-16 17:35:49 +08:00
Billy Chan
4c147a2d24
Rewrite doctests
2021-11-16 16:27:54 +08:00
Billy Chan
9655805316
Will fail, as expected
2021-11-16 15:54:17 +08:00
Billy Chan
d5de8b1c48
Should fail
2021-11-16 15:38:22 +08:00
Billy Chan
fd50ffd5ea
Merge remote-tracking branch 'origin/master' into returning
2021-11-16 14:44:12 +08:00
Chris Tsang
5f2fa55253
Edit docs
2021-11-14 16:58:52 +08:00
Billy Chan
4d44827d2f
Docs
2021-11-11 13:30:36 +08:00
Billy Chan
9c1646b198
Fixup
2021-11-10 15:53:37 +08:00
Billy Chan
ac804a1642
Imports PaginatorTrait
by default making it backward compatible
2021-11-10 15:26:29 +08:00
Billy Chan
80c0d69733
Merge remote-tracking branch 'origin/master' into returning
2021-11-08 17:37:54 +08:00
Billy Chan
50605c731b
FIXME: breaking behaviors
2021-11-05 22:39:25 +08:00
Billy Chan
a977572762
Update with returning for Postgres
2021-11-05 22:13:52 +08:00
Billy Chan
c39a3b8cb2
Insert with returning for Postgres
2021-11-05 18:20:25 +08:00
Billy Chan
47e2486ead
Refactoring
2021-11-05 16:25:55 +08:00
Billy Chan
10f3de0f9d
Only eq
& ne
operators with enum casting
2021-11-05 11:13:31 +08:00
Billy Chan
67bb168e49
Correctly apply filters on enum columns
2021-11-04 11:40:05 +08:00
Billy Chan
2b841b1b5d
Refactoring
2021-11-04 10:49:50 +08:00
Billy Chan
bb78a1d709
More ergonomic DeriveActiveEnum
derive macro
2021-11-03 15:38:42 +08:00