174 Commits

Author SHA1 Message Date
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
Billy Chan
036edf9d70
Noop when update without providing any values (#1384)
* Noop when update without providing any values

* Add tests

* Update Cargo.toml

* Bump SeaQuery's version

* Fixup

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2023-01-26 17:12:50 +08:00
Forest Anderson
bb39684f48
Add JsonBinary attribute (#1346)
* Add JsonBinary attribute to column

* Add Postgres test section, test binary json

* Added expanded entity format test

* Fixed unit test
2023-01-18 19:09:01 +08:00
Billy Chan
cbd7a8d1c9
Cleanup the use of vec![] (#1367)
* Public methods accept any IntoIterator as argument

* refactoring
2023-01-11 14:17:06 +08:00
Billy Chan
e246d3faaf
Cont. Upgrade to SeaQuery 0.28.0 (#1366)
* Upgrade to SeaQuery 0.28.0

* Remove unnecessary heap allocation

* Upgrade sea-query-binder

* Upgrade sea-schema

* Fix

* Upgrade sea-schema

* refactoring

Co-authored-by: Ivan Krivosheev <py.krivosheev@gmail.com>
2023-01-05 20:41:28 +08:00
Billy Chan
384ac1bea6
Cont. sea-orm-cli Implement derives & attributes parameters for entity generation (#1321)
* sea-orm-cli Implement derives & attributes parameters for entity generation (#1124)

* implement derives & attributes for cli

* fmt and clippy fix

* use comma delimiter for attributes arg

* Update help message use `'` instead of `"` to quote

* Refactoring

* remove unnecessary cloning

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>

* [CLI] generate model with extra derives and attributes

* clippy

Co-authored-by: Isaiah Gamble <77396670+tsar-boomba@users.noreply.github.com>
2022-12-20 12:59:42 +08:00
Billy Chan
9282ce2ded
Cont. Add serde skip options for hidden columns to the CLI (#1320)
* Add serde skip options for hidden columns to the CLI (#1171)

* Add serde skip options for hidden columns to the CLI

* Resolve rustfmt and clippy issues

* Use SerdeDeriveOptions instead of WithSerde in tests

* Resolve upstream conflict

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>

* [CLI] serde_skip_hidden_column

* clippy

* clippy

Co-authored-by: Jacob Trueb <jtrueb@northwestern.edu>
2022-12-20 00:43:21 +08:00
Billy Chan
3f00725ee2
Cli serde skip deserialize for primary key option (#1186) (#1318)
* Cli serde skip deserialize for primary key option (#1186)

* Add CLI option to skip primary keys with serde

Implements: https://github.com/SeaQL/sea-orm/issues/841

* Codegen: fix tests

* complete skip_deserialize cli feature

* run fmt

* fix tests

Co-authored-by: witcher <witcher@wiredspace.de>

* [cli] should be `#[serde(skip_deserializing)]`

* [CLI] code refactor

* [cli] rename

Co-authored-by: Isaiah Gamble <77396670+tsar-boomba@users.noreply.github.com>
Co-authored-by: witcher <witcher@wiredspace.de>
2022-12-19 22:11:45 +08:00
Billy Chan
8982d88774
Skip implementing Related if the same related entity is being referenced by a conjunct relation (#1298) 2022-12-17 12:52:04 +08:00
Billy Chan
ccca35ab1a
clippy 2022-12-16 16:48:16 +08:00
Billy Chan
b2185af559
Cleaning up dependency (#1300)
* Dependency version cleanup

* Update build tool

* Disable default features

* [cli] disable default features
2022-12-16 15:52:00 +08:00
jiayi
8e888eda7b
generate Related for many-to-many relation with extra columns (#1260) 2022-12-01 13:14:20 +08:00
Billy Chan
a7c8970800
[sea-orm-cli] generate entity with relation variant order by name of reference table (#1229) 2022-11-24 12:15:31 +08:00
Chris Tsang
93089567d5 sea-orm-codegen 0.10.3 2022-11-14 15:08:25 +08:00
Billy Chan
1b2834137b
[CLI] Fix generating Enum with variant starts with number (#1211) 2022-11-09 15:02:01 +08:00
Chris Tsang
a459f24320 sea-orm-codegen 0.10.2 2022-11-06 21:03:36 +08:00
Chris Tsang
40e44b31dd Update MSRV to 1.65 2022-11-06 21:03:35 +08:00
frederikhors
9af5885632
Update writer.rs (#1174)
Fixes https://github.com/SeaQL/sea-orm/issues/1173
2022-11-04 18:37:44 +08:00
Billy Chan
2419401d30
sea-orm-codegen 0.10.1 2022-10-27 16:03:36 +08:00
Billy Chan
5e0c625ac0
Fix - vector of float & double does not derive Eq (#1158)
* Fix - vector of float & double does not derive Eq

* clippy

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-10-27 00:40:03 +08:00
Andrey Kutejko
7e92876feb
Escape Rust keywords used in table names (#1052)
* Escape Rust keywords used in table names

* Escape rust keyword when generating conjunct relation impl

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2022-10-26 11:22:08 +08:00
Billy Chan
a3fb8e8b0d
[cli] generate Related for m-to-n relation (#1075) 2022-10-26 11:20:33 +08:00
Billy Chan
b5b9790252
Support array datatype in PostgreSQL (#1132)
* PostgreSQL array (draft)

* Fixup

* Fixup

* Fixup

* Fixup

* Fixup

* Refactoring

* generate entity for Postgres array fields

* Add tests

* Update Cargo.toml

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-10-23 18:26:57 +08:00
Chris Tsang
8d7230d6ec Dependency 2022-10-19 00:21:47 +08:00