14 Commits

Author SHA1 Message Date
ForzenString
744e063222 add SelectColumns only modify select columns
add `PartialModelTrait` for a part of model

re-export `PartialModelTrait`

cargo fmt

add fn`into_partial_model` on `Select`&`SelectTwo`

add `DerivePartialModel` to impl `PartialModel`

add macro `DerivePartialModel` to `sea-orm`

disambiguate `SelectColumns` function

fix macro error

cargo fmt && cargo clippy

move `SelectColumns` from helper.rs to traits.rs

cargo fmt

Reduce nest hell of load attribute argument fetch

 test `DerivePartialModel`  input parse

`DerivePartialModel` not derive with generic

fix `DerivePartialModel` code generate error

remove unused use

cargo fmt

add `into_partial_model` for `SelectTwoMany`
2023-04-26 18:28:44 +08:00
Billy Chan
2eda8aa3f2
Drop the use of sea-strum and depends on the original strum with a tailored EnumIter provided (#1535)
* Update heck dependency

* Fix formatter error

* Drop the use of `sea-strum` and depends on the original `strum` with a tailored `EnumIter` provided

* fmt

* Depends on `strum` 0.23

* Depends on `strum` 0.24

* Source code adapted from https://github.com/Peternator7/strum

* Update LICENSE

---------

Co-authored-by: Sergei Ivankov <sergeiivankov@pm.me>
Co-authored-by: Sergei Ivankov <96142843+sergeiivankov@users.noreply.github.com>
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2023-03-22 11:47:15 +08:00
Billy Chan
ab2f784701
(de)serialize custom JSON types - 2 (#794)
* de(serialize) custom JSON types

* Rename DeriveTryGetableFromJson -> FromJsonQueryResult

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-07-01 01:27:46 +08:00
Billy Chan
1054d6451c
Use file!() macro to avoid manually defining the name of migration (#736)
* Add `DeriveMigrationName`

* CLI migrate generate without replacing migration name

* Update migrations

* Fixup
2022-06-29 00:42:59 +08:00
Billy Chan
8627c8d961
Draft ActiveEnum 2021-10-19 19:08:02 +08:00
Ari Seyhun
4f64c66813 Add derive DeriveIntoActiveModel 2021-10-11 14:34:02 +07:00
Ari Seyhun
0f0d5b52b4 Add DeriveRelation 2021-09-07 22:12:23 +08:00
Chris Tsang
022bee0627 cargo fmt 2021-09-07 20:37:51 +08:00
Marco Napetti
8d8b3e7813 Split-up macro 2021-09-06 11:14:00 +02:00
Chris Tsang
890464f913 Save custom ActiveModel 2021-06-05 22:17:22 +08:00
Billy Chan
7aaeef834c
Move to separate DeriveActiveModel, cargo fmt 2021-05-25 18:27:44 +08:00
Chris Tsang
62b3c37e20 cargo fmt 2021-05-17 19:51:26 +08:00
Chris Tsang
106bb20cb5 Derive FromQueryResult 2021-05-17 19:48:53 +08:00
Billy Chan
07b58551af
Add proc_macro 2021-05-17 16:59:34 +08:00