178 Commits

Author SHA1 Message Date
Tom Hacohen
30e7625300
Fix FromQueryResult when Result is redefined
Macros should only ever use absolute import paths.
Shorthands can clash (as they have in my case).
2022-01-30 13:00:02 +02:00
Szepesi Tibor
660f23313e
Remove r# prefix from column name when field has a raw identifier 2022-01-29 18:14:23 +01: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
2e038a7eae
feat: allow model with generics attribute (#400) 2022-01-14 01:18:13 +08:00
Chris Tsang
82bad4a376 0.5.0 2022-01-01 16:05:36 +08:00
Chris Tsang
cb26ed35bf sea-orm-macros 0.5.0-rc.1 2021-12-26 02:30:27 +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
acf8eac441
Show tracing log only when test failed 2021-12-17 12:52:33 +08:00
Chris Tsang
7da5b6bf90
Merge pull request #373 from nappa85/master 2021-12-15 00:49:52 +08:00
Chris Tsang
7327a00cb2 sea-orm-macros 0.4.2 2021-12-12 22:48:03 +08:00
Chris Tsang
6cecc4e61f
Merge pull request #360 from caido/feat/column-table-iden
Add feature to generate table Iden
2021-12-12 22:23:31 +08:00
Marco Napetti
8ad9781a3f Remove debug features 2021-12-09 16:20:53 +01:00
Emile Fugulin
aaec1bc845 Use attribute instead of compilation flag 2021-12-08 13:50:34 -05:00
Billy Chan
2e26fa3873
Fix clippy warnings 2021-12-07 22:41:27 +08:00
Emile Fugulin
f04ef378c6 Add feature to generate table Iden 2021-12-04 12:05:24 -05:00
Chris Tsang
67b75fe680 sea-orm-macros 0.4.1 2021-12-05 00:15:54 +08:00
Chris Tsang
6ec3883bc1 sea-orm-macros 0.4.0 2021-11-19 23:06:19 +08:00
Billy Chan
f809242c1f
Test [issues] 2021-11-16 18:40:37 +08:00
Billy Chan
f64f1e9216
DeriveActiveEnum generate code that depends on sea-query inside sea-orm 2021-11-04 11:01:29 +08:00
Billy Chan
bb78a1d709
More ergonomic DeriveActiveEnum derive macro 2021-11-03 15:38:42 +08:00
Billy Chan
6018d3f1b9
Merge remote-tracking branch 'origin/master' into active-enum 2021-11-02 12:18:37 +08:00
Billy Chan
6904b9f057
Try fixing sea-orm-macros doctest errors 2021-10-31 15:45:42 +08:00
Charles Chege
870ca3ffb0 Run fmt --all 2021-10-30 12:00:07 +03:00
Charles Chege
06aa9e3175 Document the macros.
Add code examples for the macros
2021-10-29 10:36:18 +03:00
Charles Chege
497bdbe3dd Document the macros.
Add code examples for the macros
2021-10-28 15:46:38 +03:00
Billy Chan
fe64d53b45
Merge remote-tracking branch 'origin/master' into active-enum 2021-10-27 13:24:35 +08:00
Carter Snook
058f6d5d2b
chore: update to Rust Edition 2021 (#273) 2021-10-26 17:27:53 +08:00
Chris Tsang
24df068cca sea-orm-macros 0.3.1 2021-10-23 16:04:59 +08:00
Billy Chan
e911d2f5f4
Unify case-transform using the same crate 2021-10-21 11:36:57 +08:00
Billy Chan
f1ef7d9c47
Add DbErr::Type 2021-10-20 16:41:01 +08:00
Billy Chan
eed8b7c51e
Add docs 2021-10-20 15:06:23 +08:00
Billy Chan
bf1663506a
Fix clippy warnings 2021-10-20 12:25:26 +08:00
Billy Chan
30e17a26d9
Better error messages 2021-10-20 12:17:10 +08:00
Billy Chan
8627c8d961
Draft ActiveEnum 2021-10-19 19:08:02 +08:00
Chris Tsang
9f395fefee sea-orm-macros 0.3.0 2021-10-16 01:45:32 +08:00
Billy Chan
864ec522b8 Add #[automatically_derived] to all derived implementations 2021-10-15 21:25:31 +08:00
Chris Tsang
760c439c83 Unit test DeriveIntoActiveModel 2021-10-13 18:58:00 +08:00
Ari Seyhun
4f64c66813 Add derive DeriveIntoActiveModel 2021-10-11 14:34:02 +07:00
Chris Tsang
f0aea3bf10 sea-orm-macros 0.2.6 2021-10-09 23:17:30 +08:00
Chris Tsang
cab0f6ba6e Merge pull request #224 from SeaQL/rust-keywords
Escape rust keywords with `r#` raw identifier
2021-10-07 16:36:56 +08:00
Chris Tsang
a1e6e002d1 sea-orm-macros 0.2.5 2021-10-06 18:48:12 +08:00
Chris Tsang
dc1bf2c066 sea-orm-macros 0.2.4 2021-10-01 12:37:48 +08:00
Chris Tsang
a6dfb417e2
Merge pull request #207 from SeaQL/naive-date
Support `chrono::NaiveDate` & `chrono::NaiveTime`
2021-09-30 22:52:31 +08:00
Billy Chan
02066cef6e
Support chrono::NaiveTime 2021-09-30 10:34:38 +08:00
Billy Chan
f7e96b3d72
Support chrono::NaiveDate 2021-09-30 10:34:38 +08:00
Billy Chan
88776a28ed
Rename column name & column enum variant 2021-09-28 14:27:19 +08:00
Chris Tsang
64204b53fe sea-orm-macros 0.2.3 2021-09-22 17:47:58 +08:00
Chris Tsang
27807f3f6c Fix DeriveEntityModel Decimal mapping 2021-09-18 21:45:28 +08:00
Chris Tsang
89c7359759 sea-orm-macros 0.2.2 2021-09-17 23:47:48 +08:00
Chris Tsang
89661ae3d0
Merge pull request #173 from SeaQL/pg-timestamp-tz
`TimestampWithTimeZone` Fixups
2021-09-17 23:38:47 +08:00