197 Commits

Author SHA1 Message Date
Billy Chan
42553b6624
1.0.0-rc.1 2024-02-06 14:14:09 +08:00
Billy Chan
cef380b977
SQLite type mappings (#2077)
* sqlite: deps

* sqlite: update data type mappings

* sqlite: decimal test cases

* sqlite: try negative numbers

* fixup

* fixup

* fmt

* clippy

* fixup

* fixup

* fixup

* refactor

* fix

* Drop the use of `rust_decimal_macros` (#2078)

* sqlite: decimal -> real

* revert

* Bump dependencies

* Fixup

* Fixup

* Fixup

* Fixup

* Refactor

* Refactor

* Refactor
2024-02-05 14:42:55 +08:00
Chris Tsang
1abb0b2d91 Fix #1851 2024-01-24 18:24:23 +00:00
Chris Tsang
70d4278598 0.12.12 2024-01-22 09:48:29 +00:00
Billy Chan
c6e1a84a12
codegen: testing entity generation of composite foreign key (#2071) 2024-01-19 18:47:49 +08:00
Zhang Yao
d8582c30ab
Fix problems in #1819 (#1821)
* Fix problems in #1819

* Add test cases

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2024-01-19 18:39:57 +08:00
Chris Tsang
260b8a4076 0.12.11 2024-01-14 16:10:33 +00:00
Chris Tsang
e10dcd012f Revert "Fixup"
This reverts commit 8a29cba78a45fc6c7fa578dfb0163ec44a77de98.
2023-12-14 20:20:25 +00:00
Chris Tsang
8a29cba78a Fixup 2023-12-14 20:03:02 +00:00
Chris Tsang
4a59ca681b 0.12.10 2023-12-14 19:42:32 +00:00
Chris Tsang
d4f8e7226e Revert sea-orm-codegen 2023-12-14 10:44:31 +00:00
94eac96513
create_table_from_entity support comment (#2009)
* support table and column comment

* create_table_from_entity support comment

* fmt code

* fmt code

* add comment test

* fix test
2023-12-14 18:22:36 +08:00
Chris Tsang
1ce3778c61 0.12.6 2023-11-13 09:03:26 +00:00
Chris Tsang
070a30aab1 0.12.5 2023-11-12 20:14:29 +00:00
Chris Tsang
8ab24cf884
Enum extra attributes (#1966)
* Feature: Adds sea-orm-cli generate `--enum-extra-attributes` option (#1952)

* Adds `--enum-extra-derives`

* Adds test_enum_extra_attributes

---------

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>

* Fixup

---------

Co-authored-by: Zander Milroy <zander.milroy+github@gmail.com>
2023-11-09 03:41:57 +08:00
Lev Khoroshansky
0dbfb42bb7
Support --enum-extra-derives (#1934)
* feat: Support `--enum-extra-derives`

* test: Enum extra derives

* style: Don't format derives

* fix: Put `quote!` inside a function with `#[rustfmt::skip]`
2023-11-09 03:04:24 +08:00
Zander Milroy
5fe81c5867
Fix duplicated active enum use statements on generated entities (#1953)
* fix: Only generate `use` statements once per enum

* Adds gen_import_active_enum tests

---------

Co-authored-by: Schlüter Lukas <lukas.schlueter@gmail.com>
2023-11-09 01:06:33 +08:00
Chris Tsang
240620176c 0.12.4 2023-10-19 19:28:46 +01:00
Chris Tsang
f9db14c686 0.12.3 2023-09-22 18:13:25 +01:00
Billy Chan
9d033d01a8
Fix: generate relation for related entity of composite foreign key (#1693)
* Fix: generate relation for related entity of composite foreign key

* clippy
2023-09-22 02:28:49 +08:00
Chris Tsang
edd6c9b362 cargo clippy 2023-08-25 22:02:33 +01:00
Chris Tsang
242237aa51 0.12.2 2023-08-04 20:44:05 +01:00
Chris Tsang
1e6b10b532 0.12.1 2023-07-27 15:01:42 +01:00
Chris Tsang
96087291c2 0.12.0-rc.5 2023-07-25 16:28:35 +08:00
Billy Chan
9b54797dd7
Upgrade SQLx to v0.7 (#1742)
* Upgrade SQLx to v0.7

* Refactoring

* Fixup

* Bump SeaSchema version

* Fixup

* Refactoring

* Refactoring

* dep

* Bump

* Update sea-schema

* Update sea-schema

---------

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2023-07-22 01:56:48 +08:00
Niklas Korz
73a57836fa
sea-orm-codegen: PostgreSQL enum arrays (#1678)
* sea-orm-codegen: PostgreSQL enum arrays

* Refactoring

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2023-07-21 21:45:11 +08:00
Chris Tsang
4e8d0b0c0c 0.12.0-rc.4 2023-07-08 00:14:02 +08:00
Billy Chan
acca634e03
Revert "Upgrade SQLx to v0.7"
This reverts commit 832fabf8ff296896231c0d00bc42ecde779c6d5f.
2023-07-07 16:31:15 +08:00
Billy Chan
832fabf8ff
Upgrade SQLx to v0.7 2023-07-07 16:30:21 +08:00
darkmmon
64342b105c
Upgrading to syn v2 (#1713)
* resetted and re-did the changes

* fmt

* upgraded to syn2 for sea-orm-codegen

* Rename `bae2`

* Drop the use of `#[sea_orm(table_name = "col_name")]` in `DeriveColumn`

* unified derived input metadata parsing filter

* Propagate errors

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2023-06-26 20:15:37 +08:00
Chris Tsang
c4f1a3c4af Give up
This reverts commit 27af2c9c056be580d22d3a32fd0f766cf4443e3c.
2023-06-22 17:05:33 +08:00
Chris Tsang
27af2c9c05 cargo fmt check 2023-06-22 07:42:48 +08:00
Chris Tsang
b45534c8c2 0.12.0-rc.3 2023-06-22 07:00:42 +08:00
Chris Tsang
20312b776d Revert "Changelog"
This reverts commit 5e5aa7cbd184db141446960e7960d12c9a61363a.
2023-06-20 17:31:25 +08:00
Chris Tsang
5e5aa7cbd1 Changelog 2023-06-20 17:23:05 +08:00
Panagiotis Karatakis
3300336b1a
Expand SeaORM entity generator with Seaography related data (#1599)
* Add DeriveRelatedEntity macro

* Add generation for related enum and seaography

* Add seaography cli param

* update codegen tests

* Fix DeriveRelatedEntity macro doc and includes

* Fix all RelatedEntity variants for RelationBuilder

* Add tests for code

* Cargo format

* Fix clippy code

* Fix format

* Fix unit tests

* Fix unit tests

* Provide default for seaography::RelationBuilder

* Update changelog

* Update tests

* Modify code to match feedback
* Bring old Related Impl trait generation
* Modify DeriveRelatedEntity to gen impl seaography::RelationBuilder
* Generate RelatedEntity enum when seaography flag is enabled

* Update documentation

* Update Changelog

* Fix format errors

* Fix code generation
* relations with suffix are definition based
* Rev => Reverse easier to read
* snake_case to cameCase for name generation

* Fix unit tests

* Update lib.rs

* derive `seaography::RelationBuilder` only when `seaography` feature is enabled

* Try constructing async-graphql root for "related entity" and "entity" without relation

* Update demo

* CHANGELOG

* Update Cargo.toml

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>

* Revert "Update Cargo.toml"

This reverts commit 6b1669836a4fb5040bfb08999f0cf640c74dc64d.

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2023-05-19 22:14:46 +08:00
Billy Chan
44a94d65d2
Bump SeaQuery and SeaSchema to new latest RC version (#1661) 2023-05-18 16:51:13 +08:00
Billy Chan
2c082558df
Generate entity for duplicated many-to-many paths (#1435)
* Generate entity for duplicated many-to-many paths

* CI: run cargo fmt with nightly channel
2023-04-13 11:16:49 +08:00
Billy Chan
737a894e27
Upgrade sea-query to 0.29 (#1562)
* Upgrade `sea-query` to 0.29

* clippy

* More upgrades

* fixup
2023-03-22 17:24:42 +08:00
Billy Chan
f646aa7a70
chore: re-export sea_query::BlobSize in sea_orm::entity::prelude (#1548) 2023-03-20 18:52:26 +08:00
Billy Chan
5ba9aba900
chore: enable required syn features (#1556) 2023-03-20 18:44:51 +08:00
Billy Chan
e903f17b15
chore: upgrade heck in sea-orm-codegen to 0.4 (#1544) 2023-03-16 19:05:58 +08:00
Billy Chan
8afc3eb2a3
Prepare 0.12.0 2023-03-16 18:28:03 +08:00
Billy Chan
fe38d5ed25
0.11.1 2023-03-10 22:13:02 +08:00
Billy Chan
4b9038ea71
fix: codegen write binary column definition (#1529) 2023-03-10 18:01:33 +08:00
Chris Tsang
2a4e5e00fd 0.11.0 2023-02-07 02:51:00 +08:00
Chris Tsang
9e36c1103e 0.11.0-rc.2 2023-02-04 16:10:21 +08:00
Chris Tsang
f9e8f861ce sea-orm-codegen 0.11.0-rc.1 2023-02-01 23:46:42 +08:00
Billy Chan
08a5e87e22
Replace SeaORM's ColumnType (#1395)
* Replace SeaORM's `ColumnType`

* Bump SeaQuery's version

* Fix merge conflict

* refactor
2023-01-29 11:06:01 +08:00
Billy Chan
71dbffc725
Fix clippy (#1426)
* Fix clippy

* Fix clippy
2023-01-27 18:50:20 +08:00