278 Commits

Author SHA1 Message Date
Chris Tsang
a8a05f4ca4 1.1.3 2024-12-24 00:47:21 +00:00
Billy Chan
afdf9bba0d
1.1.2 2024-12-02 14:55:33 +08:00
Billy Chan
7b1495d168
Upstream Pro - 1 (#2415)
* Added `ColumnTrait::enum_type_name()` to signify enum types

* dep

* Added `DbBackend::boolean_value()` for database dependent boolean value

* Bump sea-query

* fmt
2024-12-02 14:33:21 +08:00
Billy Chan
9d0f7e3917
clippy 2024-12-02 13:56:27 +08:00
Chris Tsang
4a0fbcc43d 1.1.1 2024-11-04 01:01:05 +00:00
Jonas Platte
ead131d937
Use input ident instead of associated type projections in ActiveModel derive (#2349)
* Use input ident instead of associated type projections in ActiveModel derive

* Add a test
2024-10-25 11:04:35 +01:00
Billy Chan
0c5668dcd8
1.1.0 2024-10-15 14:35:37 +08:00
Billy Chan
fecc43196e
1.1.0-rc.3 2024-10-15 14:34:33 +08:00
Billy Chan
c64f48d85f
1.1.0-rc.2 2024-10-04 17:44:26 +08:00
Jonathan Creekmore
fb442298dd
call EnumIter::get using fully qualified syntax (#2321)
* call `EnumIter::get` using fully qualified syntax

`itertools` version 0.13.0 added a `get` method that takes precedence
over the `EnumIter::get` method. The `EnumIter` derive should be calling
the method fully-qualified to ensure that the local version is called
rather than the method that is provided by the `Itertools` trait. This
was fixed in `strum` 0.26.x, but since this is a forked/adapted version
of the `EnumIter` derive, it requires the same fix .

* CHANGELOG

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2024-10-04 17:11:25 +08:00
Gaëtan
61516e188a
Update DeriveActiveEnum doc (#2345)
* Update DeriveActiveEnum doc

* One more line

* CHANGELOG

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2024-10-04 16:49:55 +08:00
Alvaro Parker
bfd21e92e3
Fix typos (#2360)
* fix typos

* CHANGELOG

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2024-10-04 16:42:52 +08:00
Billy Chan
9d5e3eed79
1.1.0-rc.1 2024-08-09 18:33:10 +08:00
Billy Chan
4587d36e6f
1.0.0 2024-08-02 17:08:28 +08:00
Billy Chan
651c419b1b
Fix clippy warnings 2024-08-02 14:45:14 +08:00
Billy Chan
dbf475bf9d
1.0.0-rc.7 2024-06-25 11:50:11 +08:00
Billy Chan
3758f0c51d
1.0.0-rc.6 2024-06-19 20:41:58 +08:00
Billy Chan
9e93107bb8
Fix 2024-06-19 19:06:17 +08:00
Chris Tsang
987cb38aaf 1.0.0-rc.5 2024-05-29 13:46:38 +01:00
Chris Tsang
562778f61d One last refactor 2024-05-29 01:01:12 +01:00
Chris Tsang
e3f64b1892 Refactor 2024-05-29 01:00:14 +01:00
Chris Tsang
461aa925f6 Fix bug and update changelog 2024-05-29 00:53:09 +01:00
Chris Tsang
9152d8cac9 Refactor 2024-05-28 20:30:13 +01:00
Chris Tsang
3e45ac42a2 Revert case_style.rs 2024-05-28 20:18:25 +01:00
Anshul Sanghi
33230ab3ad
Auto Generated ActiveEnum String Values And Model Column Names (#2170)
* WIP: Add Basic Support For Providing String Value For ActiveEnum Variants Based On Renaming Rules #2160

* WIP: Use Existing Case Style Handlers For Enum Rename Rules, Add Unit Tests For DeriveActiveEnum rename rules #2160

* WIP: Improve Implementation Of Name Case Parameters In ActiveEnum Macros #2160

* WIP: Implement Case Styles Based Name Generation For Columns In A Model #2160

* Fix Formatting #2160

* Rename Column Name And Enum Variant Renaming Macro Attributes #2160

* Revert Adding `Rename` Attribute For Column Names #2160

* Revert Unintended Formatting Changes #2160

* Fix formatting

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2024-05-28 20:02:41 +01:00
Chris Tsang
e77cc5fa65
Merge pull request #2186 from SeaQL/entity-behavior
Associate `ActiveModel` to `EntityTrait`
2024-05-09 17:53:31 +01:00
Billy Chan
0798bf2037
1.0.0-rc.4 2024-05-03 16:07:49 +08:00
Billy Chan
33f4659db7
clippy 2024-05-03 13:46:38 +08:00
Chris Tsang
3b3a4463ad fmt 2024-04-03 21:33:35 +01:00
Chris Tsang
1c269a081f Associate ActiveModel to EntityTrait 2024-04-03 21:14:22 +01:00
Billy Chan
cdf216ccb1
1.0.0-rc.3 2024-03-27 00:17:41 +08:00
Albert Marashi
96917c5a1a
Use full qualifier in derives (#1665)
* Update active_model.rs

* Update active_model.rs

Added missing sea_orm qualifier
2024-03-24 00:23:45 +00:00
Chris Tsang
65de9f929c 1.0.0-rc.2 2024-03-15 23:31:56 +00:00
凊弦凝绝
a0a7e74ae9
Fix DerivePartialModel attr entity not support syn::Type token (#2137)
* 🐛 fix macro attr `entity` only accept `Ident`

* 🎨 cargo fmt

*  fix test
2024-03-10 18:20:24 +00:00
Billy Chan
f3967fdaca
Upstream Changes - 1 (#2145)
* upstream changes

* universal `#[sea_orm_macros::test]`

* fix

* fix

* `ColumnTrait::into_returning_expr`

* fix

* fix

* Do not pub sqlx_common

---------

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2024-03-10 18:14:46 +00:00
Billy Chan
b775027fee
Explicit StringLen on ColumnType::String (#2123) 2024-03-05 15:31:58 +08:00
Wyatt Herkamp
0adcd3b36c
Update Strum (#2088)
* Update Strum

* Change log update

* Fetch updates from upstream Strum

* build-tools/update-strum-macros.sh

* Revert "Fetch updates from upstream Strum"

This reverts commit 32cf8f7ac96f9b0431d2bde682b69ec44b4f5b2e.

* Update enum_iter.rs

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2024-02-06 18:33:20 +08:00
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
59e987453d fmt 2024-01-27 19:43:04 +00:00
Chris Tsang
8e6316c90e fmt 2024-01-27 19:32:39 +00:00
Chris Tsang
3c07c91d54 Doc #2083 2024-01-27 19:31:43 +00:00
Chris Tsang
70d4278598 0.12.12 2024-01-22 09:48:29 +00:00
Chris Tsang
260b8a4076 0.12.11 2024-01-14 16:10:33 +00:00
bobogei81123
13d383e43c
fix: fully qualify types in DeriveValueType macro (#2054)
`DeriveValueType` proc macro relies on several sea-orm types to be
imported. This is partially fixed in #1855 by fully qualifying
`sea_orm::QueryResult`, but others like `sea_orm::Value` is still not
being qualified. Also, if use defined a type alias on
`std::result::Result`, it can cause the proc macro to generate code that
won't compile.

- Fully qualify `sea_orm::Value`, `std::string::String`, and
  `std::result::Result` in `DeriveValueType` proc macro.
- Add some simple integration tests for this.
- Add doc and doc test in `sea_orm_macro::derive_value_type`.
2024-01-14 23:06:40 +08:00
Chris Tsang
f54683d365
Refactor/fix clippy errors (#2056) (#2057)
* chore: add clippy config file

* refactor: fix clippy errors and wornings of runtime-async-std-native-tls,sqlx-all

* refactor: fix clippy errors and wornings of sqlx-sqlite, sqlx-mysql, sqlx-postgres

* chore: format

* refactor: fix clippy

* fix: import path

* refactor: fix clippy errors and wornings of sqlx-sqlite, sqlx-mysql, sqlx-postgres

* fix: revert some space and comma removal

* fix: revert some space and comma removal

* refactor: add feature flag

* fix: import path

* test: remove mismatch feature flag

* test: remove mismatch feature flag

* chore: add proper feature flag

* chore: remove feature flag

* refactor: remove clippy.toml file

* fix: re-export driver

* fix: re-export JoinType

* fix: remove feature flag

* chore: add #[allow(unused_imports)] for driver

Co-authored-by: Shogo Nakano <61229807+shogo-nakano-desu@users.noreply.github.com>
2024-01-11 00:21:22 +08:00
Chris Tsang
4a59ca681b 0.12.10 2023-12-14 19:42:32 +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
Wyatt Herkamp
b4010ecb64
Add #[sea_orm(skip)] for FromQueryResult macro (#1954)
* Add #[sea_orm(skip)] for FromQueryResult macro

* Update sea-orm-rocket

* Revert "Update sea-orm-rocket"

This reverts commit b7226bb44dbdbab9782524feb0303c4c166d3050.
2023-11-08 23:45:38 +08:00