4 Commits

Author SHA1 Message Date
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
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
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