* Move core implementations to a standalone crate
* Set up integration test skeleton in `core`
* Demonstrate mock testing with query
* Move Rocket api code to a standalone crate
* Add mock execution
* Add MyDataMyConsent in COMMUNITY.md (#889)
* Add MyDataMyConsent in COMMUNITY.md
* Update MyDataMyConsent description in COMMUNITY.md
* Update COMMUNITY.md
Chronological order
* [cli] bump sea-schema to 0.9.3 (SeaQL/sea-orm#876)
* Update CHNAGELOG PR links
* 0.9.1 CHANGELOG
* Auto discover and run all issues & examples CI (#903)
* Auto discover and run all [issues] CI
* Auto discover and run all examples CI
* Fixup
* Testing
* Test [issues]
* Compile prepare_mock_db() conditionally based on "mock" feature
* Update workflow job to run mock test if `core` folder exists
* Update Actix3 example
* Fix merge conflict human error
* Update usize used in paginate to u64 (PR#789)
* Update sea-orm version in the Rocket example to 0.10.0
* Fix GitHub workflow to run mock test for core crates
* Increase the robustness of core crate check by verifying that the `core` folder is a crate
* Update Actix(4) example
* Update Axum example
* Update GraphQL example
* Update Jsonrpsee example
* Update Poem example
* Update Tonic example
* Cargo fmt
* Update Salvo example
* Update path of core/Cargo.toml in README.md
* Add mock test instruction in README.md
* Refactoring
* Fix Rocket examples
Co-authored-by: Amit Goyani <63532626+itsAmitGoyani@users.noreply.github.com>
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
* Enable migration generation in modules
Previously, migration generation expected migrations
to be at the crate root.
* Fix migration backup file extension
* Document behavior of migration_dir
I tried to implement a [custom active
model](https://www.sea-ql.org/SeaORM/docs/advanced-query/custom-active-model/),
and one of the columns was `Option<TimeDateTimeWithTimeZone>`. I got a
compiler error:
```
error[E0277]: the trait bound `std::option::Option<sea_orm::prelude::TimeDateTimeWithTimeZone>: IntoActiveValue<_>` is not satisfied
```
Looking into the source code, it seemed a simple oversight that this
trait was implemented for the `chrono` types but not the `time` types,
and it was easy enough to fix since there's already a macro to implement
it for new types.
I also noticed that the `time` types are not accounted for in
`src/query/json.rs` while the `chrono` types are, which I assume is also
an oversight. However, I don't have a need for that at this point and
the fix for that seemed less trivial, so I'm just bringing it to your
attention.
Thanks for SeaORM!
* feat: Introducing feature "sqlx-error"
Purpose of this feature is to not convert errors given from sqlx into strings to ease further analysis of the error and react to it accordingly. This implementation uses a feature switch and an additional error kind to avoid interfering with existing implementations without this feature enabled.
See discussion https://github.com/SeaQL/sea-orm/discussions/709
* fix: Align feature "sqlx-error" with merged Migration error kind
Due to the merge, an other error kind had been introduced and the DbErr became Eq and Clone, however Eq cannot easily be derived from, so I went back to PartialEq, and since the sqlx error does not implement clone, this was converted into an Arc, to allow cloning of the new kind too.
* fix: Repairing failing jobs
Several jobs had failed as I missed to correct the return values of a few methods in transaction.rs and had a wrong understanding of map_err at that point.
* feat: realigning with latest changes in sea-orm, different approach
Instead of the former approach to introduce a new error kind, now the existing error types get extended, for now only Exec and Query, because these are the most relevant for the requirement context.
Afterwards it might still be possible to add some further detail information.
See discussion https://github.com/SeaQL/sea-orm/discussions/709
* Update src/driver/sqlx_mysql.rs
Integrating fixes done by @Sculas
Co-authored-by: Sculas <contact@sculas.xyz>
* Update src/driver/sqlx_postgres.rs
Integrating fixes done by @Sculas
Co-authored-by: Sculas <contact@sculas.xyz>
* Update src/driver/sqlx_sqlite.rs
Integrating fixes done by @Sculas
Co-authored-by: Sculas <contact@sculas.xyz>
* feat: reworking feature with thiserror
Following the latest suggestions I changed the implementation to utilize `thiserror`.
Now there are more error kinds to be able to see the different kinds directly in src/error.rs
To ensure the behaviour is as expected, I also introduce a further test, which checks for a uniqueness failure.
Co-authored-by: Sculas <contact@sculas.xyz>