Billy Chan
2389a4c83e
Fix: fields with type Option<T>
are always nullable ( #1257 )
2022-12-01 12:27:49 +08:00
Billy Chan
9dfc481c3b
Fix clippy warnings ( #1188 )
...
* Fix clippy warnings
* More fixes
2022-11-04 19:14:31 +08:00
Billy Chan
29deb0dfd1
Better compile error for entity without primary key ( #1020 )
2022-10-06 23:50:39 +08:00
Billy Chan
840f8f6148
DeriveEntityModel
macros override column name (#695 )
...
* Override column name with the name of model field in `DeriveEntityModel` macros [issues]
* Fixup: trim prefix and tailing underscore
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-05-09 22:08: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
Allen
bdd9133aa6
fix lints and warnings
...
also clean up impl_into_active_value macro
2022-04-09 16:52:47 -07: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
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
Billy Chan
2e038a7eae
feat: allow model with generics attribute ( #400 )
2022-01-14 01:18:13 +08: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
Billy Chan
f809242c1f
Test [issues]
2021-11-16 18:40:37 +08:00
Billy Chan
6018d3f1b9
Merge remote-tracking branch 'origin/master' into active-enum
2021-11-02 12:18:37 +08: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
Billy Chan
e911d2f5f4
Unify case-transform using the same crate
2021-10-21 11:36:57 +08:00
Billy Chan
8627c8d961
Draft ActiveEnum
2021-10-19 19:08:02 +08:00
Billy Chan
864ec522b8
Add #[automatically_derived]
to all derived implementations
2021-10-15 21:25:31 +08:00
Billy Chan
19a572b721
Escape rust keywords with r#
raw identifier
2021-10-04 23:30:20 +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
27807f3f6c
Fix DeriveEntityModel Decimal mapping
2021-09-18 21:45:28 +08:00
Chris Tsang
89661ae3d0
Merge pull request #173 from SeaQL/pg-timestamp-tz
...
`TimestampWithTimeZone` Fixups
2021-09-17 23:38:47 +08:00
Chris Tsang
e7ec68f4c1
Correct Rust type to ColumnType mapping
2021-09-17 23:06:41 +08:00
Billy Chan
37d390e500
WIP
2021-09-17 19:04:18 +08:00
Billy Chan
16e41be9df
Add & parse "ignore" macro attribute
2021-09-16 13:11:04 +08:00
Billy Chan
ca3dd2d2a1
cargo fmt
2021-09-15 10:45:09 +08:00
Ari Seyhun
1815e30405
Add DateTimeWithTimeZone
support for DeriveEntityModel
2021-09-12 20:50:28 +09:30
Billy Chan
ba276cdde5
DeriveEntityModel
supports attribute type of Vec<u8>
2021-09-10 17:11:19 +08:00
Chris Tsang
9885029585
Use DeriveEntityModel in test suite
2021-09-09 17:22:54 +08:00
Chris Tsang
9b947901b9
Fix clippy warning
2021-09-09 15:20:17 +08:00
Chris Tsang
c0a77c1298
Add type mapping
2021-09-08 00:12:47 +08:00
Marco Napetti
5567fbc289
Fix auto_increment as boolean
2021-09-07 23:06:19 +08:00
Chris Tsang
a186338ff5
Try DeriveRelation
2021-09-07 22:54:39 +08:00
Chris Tsang
022bee0627
cargo fmt
2021-09-07 20:37:51 +08:00
Marco Napetti
d4a915616a
Fix example
2021-09-07 10:38:42 +02:00
Marco Napetti
abcdbf2a48
Manage PrimaryKeyTrait::ValueType
2021-09-07 10:18:37 +02:00
Marco Napetti
c273cf0a39
Manage schema_name attribute, add prelude export, update example
2021-09-07 10:04:33 +02:00
Marco Napetti
a4b4f4925f
Minor comments fixes
2021-09-06 12:58:47 +02:00
Marco Napetti
ab925e8f11
Manage auto_increment attribute, call nullable() instead of old null()
2021-09-06 12:41:09 +02:00
Marco Napetti
cc2f491a1e
Remove panic
2021-09-06 12:21:21 +02:00
Marco Napetti
0eb6902d1b
default_value and default_expr hypotetical implementation
2021-09-06 12:02:15 +02:00
Marco Napetti
5179fb257a
Add indexed and unique support
2021-09-06 11:25:05 +02:00
Marco Napetti
8d8b3e7813
Split-up macro
2021-09-06 11:14:00 +02:00