Tim Eggert
b6c5d71fe2
Introduce optional serde support for model code generation
...
This introduces several things to optionally support automatic derive attributes for `serde::{Deserialize, Serialize}` for the generated models:
- introduces a `WithSerde` enum to indicate if Serialize, Deserialize, or even both should be derived from,
- adds an optional cli argument `--with-serde [none: default, serialize, deserialize, both]`
- adds test harness for both compact and expanded generation
2021-10-11 14:55:00 +02:00
Billy Chan
d6b53abd95
Handle crate
, Self
and self
rust keywords
2021-10-06 22:24:52 +08:00
Billy Chan
a970e43f50
Merge branch 'master' into rust-keywords
2021-10-06 22:04:55 +08:00
Billy Chan
18c245c72d
Codegen date & time column Rust type mapping
2021-10-06 21:25:37 +08:00
Billy Chan
7779ac886e
Escape rust keyword on codegen
2021-10-05 10:49:06 +08:00
Chris Tsang
be01782ac7
Merge pull request #193 from SeaQL/codegen-col-unique-keys
...
Codegen parse column unique key from index
2021-09-26 16:12:50 +08:00
Billy Chan
6638a2262c
Codegen classify ordinary relation wrongly as conjunct relation ( #186 )
2021-09-25 18:32:50 +08:00
Billy Chan
360436ceac
Codegen compact-format generate unique attribute
2021-09-24 15:45:22 +08:00
Billy Chan
06a26ace2e
Codegen parse column unique key from index
2021-09-24 15:30:41 +08:00
Billy Chan
8dfbbc8385
Fix clippy warnings
2021-09-20 18:30:31 +08:00
Billy Chan
c9047d49e7
Update README & lib.rs
2021-09-20 18:30:31 +08:00
Billy Chan
cb60c4afa3
Keep match catchall
2021-09-20 11:37:44 +08:00
Billy Chan
57201788ef
Codegen TimestampWithTimeZone
fixup
2021-09-20 11:37:44 +08:00
Billy Chan
ffb0f1f07d
Codegen supports ColumnType::TimestampWithTimeZone
2021-09-17 21:57:16 +08:00
Billy Chan
01011cf0f4
Generate macro attribute "nullable"
2021-09-15 10:46:12 +08:00
Billy Chan
39902deaef
Remove unused import
2021-09-15 10:44:24 +08:00
Billy Chan
39c5a4d134
Derive attributes
2021-09-13 23:54:42 +08:00
Billy Chan
a6f117a908
sea-orm-cli with --expanded-format
& --compact-format
flags
2021-09-10 23:08:30 +08:00
Billy Chan
9c3aba8c0e
codegen of compact entity files
2021-09-10 22:28:08 +08:00
Billy Chan
10a5a34cd9
Move files
2021-09-10 22:28:08 +08:00
Billy Chan
e852a09498
cargo clippy
2021-09-03 16:51:22 +08:00
Billy Chan
d664985ea9
WIP
2021-09-01 23:24:43 +08:00
Billy Chan
484da8f6b6
WIP
2021-08-28 20:00:59 +08:00
Billy Chan
2db5c5e8c9
Change manifest for SeaQL/sea-schema#14
2021-08-21 22:59:52 +08:00
Billy Chan
aea4ec2d54
Codegen mod.rs include prelude
2021-08-17 12:45:21 +08:00
Billy Chan
ba226a2b62
Generate arbitrary named entity ( #70 )
...
* Generate arbitrary named entity (#69 )
* Bump cli & codegen version
* CI tests no caching
* Remove local dependency path
2021-08-10 16:35:10 +08:00
Billy Chan
b1d28db5ad
Fix clippy warnings
2021-08-10 11:03:41 +08:00
Chris Tsang
c1ac7baae9
cargo fmt
2021-08-08 16:13:27 +08:00
Chris Tsang
b9a537db3b
Support sea-query 0.12.9
2021-08-08 15:42:53 +08:00
Chris Tsang
478d2a9b37
Improve codegen column to Rust type mapping
2021-08-07 21:43:32 +08:00
Billy Chan
0b10d30c64
Codegen not depends on sea-schema & sqlx
2021-07-27 21:48:41 +08:00
Sam Samai
b205fc48aa
Add Uuid to col_type for codegen
2021-07-25 21:45:08 +10:00
Billy Chan
daa0ed947d
Handle conjunction table
2021-07-22 19:08:42 +08:00
Chris Tsang
80976116de
Fix clippy warning
2021-07-18 00:02:40 +08:00
Billy Chan
a94224e0f2
Unit test sea-orm-codegen
2021-07-12 23:45:27 +08:00
Chris Tsang
6ff5a32b7a
cargo fmt
2021-07-11 22:08:37 +08:00
Billy Chan
dd8d8c3431
Codegen without find_* helper fn
2021-06-30 23:01:23 +08:00
Billy Chan
f8f3d128fd
Fix clippy warming
2021-06-30 22:50:01 +08:00
Billy Chan
9a25bb9c36
Use belongs_to
, has_one
and has_many
2021-06-22 23:42:10 +08:00
Billy Chan
83e4859776
codegen ColumnDef null() and unique()
2021-06-22 22:40:43 +08:00
Chris Tsang
91023d06c5
Codegen: update ColumnDef
2021-06-19 20:53:08 +08:00
Billy Chan
cab4b5a3f7
Codegen: Entity Generator ( #23 )
2021-06-19 19:47:59 +08:00