40 Commits

Author SHA1 Message Date
Billy Chan
1497c2c7f0
Fix DeriveActiveEnum requires additional imports (#1154)
* fix: Support deriving ActiveEnum without importing EnumIter, Iden, and ActiveEnum

* style: Fix format

* DeriveActiveEnum without depending on sea_query::Iden derive macros

* [issues] add tests

* Fix [issues] features

Co-authored-by: Naoki Ikeguchi <me@s6n.jp>
2022-10-27 00:17:46 +08:00
Billy Chan
29deb0dfd1
Better compile error for entity without primary key (#1020) 2022-10-06 23:50:39 +08:00
Billy Chan
d6831e5295
Bump version of sqlx, sea-query, sea-schema, time and uuid (#834)
* 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
2022-07-05 01:05:11 +08:00
Billy Chan
ab2f784701
(de)serialize custom JSON types - 2 (#794)
* de(serialize) custom JSON types

* Rename DeriveTryGetableFromJson -> FromJsonQueryResult

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-07-01 01:27:46 +08:00
Billy Chan
1054d6451c
Use file!() macro to avoid manually defining the name of migration (#736)
* Add `DeriveMigrationName`

* CLI migrate generate without replacing migration name

* Update migrations

* Fixup
2022-06-29 00:42:59 +08:00
Billy Chan
5a123b36aa
DerivePrimaryKey with custom primary key column name (#694)
* `DerivePrimaryKey` with custom primary key column name

* Add test cases [issues]
2022-05-09 22:00:04 +08:00
Billy Chan
acf8eac441
Show tracing log only when test failed 2021-12-17 12:52:33 +08:00
Marco Napetti
8ad9781a3f Remove debug features 2021-12-09 16:20:53 +01: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
eed8b7c51e
Add docs 2021-10-20 15:06:23 +08:00
Billy Chan
8627c8d961
Draft ActiveEnum 2021-10-19 19:08:02 +08:00
Ari Seyhun
4f64c66813 Add derive DeriveIntoActiveModel 2021-10-11 14:34:02 +07:00
Billy Chan
88776a28ed
Rename column name & column enum variant 2021-09-28 14:27:19 +08:00
Billy Chan
16e41be9df
Add & parse "ignore" macro attribute 2021-09-16 13:11:04 +08:00
Billy Chan
54bb358cca
DeriveEntityModel automatically derive DeriveModel and DeriveActiveModel 2021-09-08 22:02:24 +08:00
Ari Seyhun
0f0d5b52b4 Add DeriveRelation 2021-09-07 22:12:23 +08:00
Ari Seyhun
290f78454b Rewrite DeriveModel 2021-09-07 22:08:57 +08:00
Ari Seyhun
455fc4a934 Rewrite DeriveEntity 2021-09-07 22:08:57 +08:00
Chris Tsang
0fff7fd054 Rename to DeriveEntityModel 2021-09-07 20:37:51 +08:00
Chris Tsang
022bee0627 cargo fmt 2021-09-07 20:37:51 +08:00
Marco Napetti
a4d70dfa55
Merge branch 'entity-format' into entity_model_macro 2021-09-07 10:09:34 +02:00
Marco Napetti
8d8b3e7813 Split-up macro 2021-09-06 11:14:00 +02:00
Marco Napetti
193cd5a29d Start working on EntityModel macro 2021-09-05 12:41:54 +02:00
Billy Chan
9d5ce08ff8
Logging 2021-09-03 14:27:38 +08:00
Billy Chan
09c328bb0d Use smol async-runtime and require one of the supported runtime for integration tests 2021-08-21 22:56:48 +08:00
Billy Chan
2cfaa34a33 Test against all supported runtime 2021-08-21 22:56:48 +08:00
Billy Chan
69b0ae1177 Custom column names with default 2021-08-13 21:39:50 +08:00
Billy Chan
8b30ef74a2 Customize column names 2021-08-12 22:53:22 +08:00
Chris Tsang
890464f913 Save custom ActiveModel 2021-06-05 22:17:22 +08:00
Chris Tsang
2bfc7f9a9f expend -> expand 2021-05-27 22:27:08 +08:00
Billy Chan
7aaeef834c
Move to separate DeriveActiveModel, cargo fmt 2021-05-25 18:27:44 +08:00
Chris Tsang
682d2151fc Entity attr as "table" 2021-05-17 19:55:46 +08:00
Chris Tsang
62b3c37e20 cargo fmt 2021-05-17 19:51:26 +08:00
Chris Tsang
106bb20cb5 Derive FromQueryResult 2021-05-17 19:48:53 +08:00
Billy Chan
07b58551af
Add proc_macro 2021-05-17 16:59:34 +08:00