35 Commits

Author SHA1 Message Date
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
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
Sergei Ivankov
c34b6feb5e
Update heck dependency (#1520)
* Update heck dependency

* Fix formatter error

---------

Co-authored-by: Sergei Ivankov <sergeiivankov@pm.me>
2023-03-16 14:13:56 +08:00
Billy Chan
4f8ad56cc4
Cont. Added support for using sea-orm with #[deny(missing_docs)] (#1531)
* Added support for using sea-orm with #[deny(missing_docs)] (#1522)

* feat(macros): Added documentation tags for generated entities

* chore: Added deny(missing_docs) attribute to basic example

* chore: Fix clippy errors

* ci: test missing docs of derive macros generated types

* Try missing docs (CI should fail)

* Revert "Try missing docs (CI should fail)"

This reverts commit 83356bfca8939e7807f14bad8bb816fcabc1bf7b.

---------

Co-authored-by: Lewin Probst, M.Sc <30552361+emirror-de@users.noreply.github.com>
2023-03-10 21:49:08 +08:00
Billy Chan
cb71e265df
Unchanged ActiveValue as Set (#1177)
* Unchanged ActiveValue as Set

* Renaming

* Rename

* Rename methods
2023-01-12 15:42:13 +08:00
Chris Tsang
50fa0843ae Qualify DbErr 2022-10-23 23:21:21 +08:00
Billy Chan
a766500ebf
Cont. "Enable convert from ActiveModel to Model" (#990)
* Changelog

* Enable convert from ActiveModel to Model (#725)

* feat: enable convert from ActiveModel to Model

* feat: add tests for converting from ActiveModel to Model

* cargo fmt

* Refactoring

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

* Fix clippy warnings

* Use error type

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
Co-authored-by: greenhandatsjtu <40566803+greenhandatsjtu@users.noreply.github.com>
2022-10-23 23:12:22 +08:00
Billy Chan
adfb9ead54
Rework ActiveValue (#340)
* WIP

* Fixup

* Fixup

* Update docs & rename `unset`

* Deprecate `Unset()` and reexport `ActiveValue::NotSet`

* Docs

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2021-12-19 02:22:30 +08:00
Charles Chege
497bdbe3dd Document the macros.
Add code examples for the macros
2021-10-28 15:46:38 +03:00
Billy Chan
864ec522b8 Add #[automatically_derived] to all derived implementations 2021-10-15 21:25:31 +08:00
Billy Chan
19a572b721
Escape rust keywords with r# raw identifier 2021-10-04 23:30:20 +08:00
Billy Chan
88776a28ed
Rename column name & column enum variant 2021-09-28 14:27:19 +08:00
Billy Chan
beca48d48e
Refactor 2021-09-16 14:59:48 +08:00
Billy Chan
16e41be9df
Add & parse "ignore" macro attribute 2021-09-16 13:11:04 +08:00
Billy Chan
11208d627b Move ActiveModel CRUD actions into ActiveModelTrait 2021-09-10 12:58:27 +08:00
Billy Chan
f4d1a52791 Change update behavior, add ActiveModel insert & update 2021-09-10 12:56:41 +08:00
Ari Seyhun
455fc4a934 Rewrite DeriveEntity 2021-09-07 22:08:57 +08:00
Chris Tsang
1e6a778a0f ValueType does not need to impl Default 2021-07-12 02:48:37 +08:00
Chris Tsang
0298cfb6af Rename to DbErr 2021-06-30 21:17:23 +08:00
Billy Chan
2a1173c174
Add & use OrmError (#36)
* Add & use OrmError

* Rename to SeaErr
2021-06-30 21:08:41 +08:00
Chris Tsang
7158e78f65 Basic test suite (sqlite) 2021-06-20 23:05:05 +08:00
Chris Tsang
5002c62b40 Use DatabaseConnection in place of Database 2021-06-19 17:28:07 +08:00
Chris Tsang
5069f92001 Delete and example 2021-06-11 23:10:56 +08:00
Chris Tsang
c70c941712 Refactor Insert one & many 2021-06-10 01:47:45 +08:00
Chris Tsang
890464f913 Save custom ActiveModel 2021-06-05 22:17:22 +08:00
Chris Tsang
cf0127d89f Save ActiveModel 2021-06-05 20:30:32 +08:00
Chris Tsang
6a26b8cc17 ActiveModelBehavior 2021-06-03 18:57:26 +08:00
Chris Tsang
2169d1284f Refactor ActiveModelTrait 2021-06-02 22:35:17 +08:00
Chris Tsang
c65cb9687b Refactor Trait bounds 2021-06-02 19:09:00 +08:00
Chris Tsang
fcc668399d Insert many 2021-05-30 18:38:11 +08:00
Chris Tsang
ea091d7438 ActiveValueState::Unchanged 2021-05-29 02:02:51 +08:00
Chris Tsang
b1afd5da3e ActiveValue 2021-05-28 13:09:31 +08:00
Chris Tsang
d3ee74cbe5 Insert POC 2021-05-28 00:38:34 +08:00
Chris Tsang
2bfc7f9a9f expend -> expand 2021-05-27 22:27:08 +08:00
Billy Chan
7aaeef834c
Move to separate DeriveActiveModel, cargo fmt 2021-05-25 18:27:44 +08:00