200 Commits

Author SHA1 Message Date
Billy Chan
d514b511a4
Showcase how to define entity with dynamic table name (#1622) 2023-05-03 11:12:23 +08:00
Billy Chan
9ca01b3e7c
Upgrade tracing-subscriber dependency to 0.3.17 (#1609)
* Upgrade `tracing-subscriber` dependency to 0.3.17

* Revert "fix: `regex` dep should enable `unicode` feature (#1605)"

This reverts commit 41d9a853342155e0b7df4afb15990225b1c8a981.
2023-04-24 14:21:15 +08:00
Billy Chan
2f062eabcc
chore: enable postgres-array feature when sqlx-postgres backend is selected (#1565) 2023-03-26 15:08:16 +08:00
Billy Chan
737a894e27
Upgrade sea-query to 0.29 (#1562)
* Upgrade `sea-query` to 0.29

* clippy

* More upgrades

* fixup
2023-03-22 17:24:42 +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
8afc3eb2a3
Prepare 0.12.0 2023-03-16 18:28:03 +08:00
Billy Chan
fe38d5ed25
0.11.1 2023-03-10 22:13:02 +08:00
Chris Tsang
2a4e5e00fd 0.11.0 2023-02-07 02:51:00 +08:00
Chris Tsang
9e36c1103e 0.11.0-rc.2 2023-02-04 16:10:21 +08:00
Billy Chan
dca2ffb5e5
Update docs.rs features (#1451) 2023-02-04 15:52:12 +08:00
Chris Tsang
c5f041b04b 0.11.0-rc.1 2023-02-01 23:46:42 +08:00
Billy Chan
036edf9d70
Noop when update without providing any values (#1384)
* Noop when update without providing any values

* Add tests

* Update Cargo.toml

* Bump SeaQuery's version

* Fixup

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2023-01-26 17:12:50 +08:00
Billy Chan
e246d3faaf
Cont. Upgrade to SeaQuery 0.28.0 (#1366)
* Upgrade to SeaQuery 0.28.0

* Remove unnecessary heap allocation

* Upgrade sea-query-binder

* Upgrade sea-schema

* Fix

* Upgrade sea-schema

* refactoring

Co-authored-by: Ivan Krivosheev <py.krivosheev@gmail.com>
2023-01-05 20:41:28 +08:00
Billy Chan
d332afa99c
Get SQLx connection pool (#1297) 2023-01-05 14:08:10 +08:00
Billy Chan
b2185af559
Cleaning up dependency (#1300)
* Dependency version cleanup

* Update build tool

* Disable default features

* [cli] disable default features
2022-12-16 15:52:00 +08:00
Billy Chan
08cb44028e
Support bigdecimal::BigDecimal (#1258)
* Fix: fields with type `Option<T>` are always nullable

* Support BigDecimal
2022-12-01 12:53:19 +08:00
Chris Tsang
ca403da0d9
Mock DbErr (#1241)
* Mock Err

* Test mock errors
2022-11-24 13:42:47 +08:00
Chris Tsang
3fed282daf Update my email 2022-11-21 16:02:04 +08:00
Billy Chan
9d2ea8deec
Dependency cleanup (#1213)
* Dependency cleanup

* Bump sea-query dependency

* Bump sea-query-binder
2022-11-15 15:10:03 +08:00
Billy Chan
4d8645ae8b
Support Vector of enum for Postgres (#1210)
* Support Vector of enum for Postgres

* Fix clippy

* Add tests for integer array

* Fix dependency

* Bump sea-query to 0.27.2

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-11-15 13:50:05 +08:00
Chris Tsang
cc7fb2864d 0.10.3 2022-11-14 15:08:25 +08:00
Chris Tsang
cbac780a96
Move once_cell to dev dependencies (#1207) 2022-11-09 16:37:55 +08:00
Chris Tsang
762c25c8f7 0.10.2 2022-11-06 21:03:37 +08:00
Chris Tsang
40e44b31dd Update MSRV to 1.65 2022-11-06 21:03:35 +08:00
Billy Chan
a85f6a3804
0.10.1 2022-10-27 16:03:39 +08:00
Billy Chan
b5b9790252
Support array datatype in PostgreSQL (#1132)
* PostgreSQL array (draft)

* Fixup

* Fixup

* Fixup

* Fixup

* Fixup

* Refactoring

* generate entity for Postgres array fields

* Add tests

* Update Cargo.toml

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-10-23 18:26:57 +08:00
Chris Tsang
46c7e8907f Update binder 2022-10-19 01:08:53 +08:00
Chris Tsang
8d7230d6ec Dependency 2022-10-19 00:21:47 +08:00
Billy Chan
34ba0229cd
Refactoring 2022-10-18 18:48:17 +08:00
Ivan Krivosheev
44690994fe
Update Cargo.toml 2022-10-17 21:55:23 +03:00
Ivan Krivosheev
e5186cdb9e
Update Cargo.toml 2022-10-17 21:53:22 +03:00
Billy Chan
468cbb9baf
Fixup 2022-10-17 22:00:42 +08:00
Billy Chan
29da37b4f2
Merge branch 'master' into sea-query-v0.27 2022-10-17 17:53:41 +08:00
Billy Chan
671d79469a
Fixup 2022-10-17 17:25:35 +08:00
Chris Tsang
5d752e60b9
Merge pull request #1002 from SeaQL/better-errors
Better error system
2022-10-07 00:24:41 +08:00
Billy Chan
3c19d7c3e4
Exclude test_cfg module from SeaORM (#1077) 2022-10-06 23:45:09 +08:00
Billy Chan
77bddd85a5
Fixup 2022-09-22 15:07:37 +08:00
Ivan Krivosheev
ab5b488860
Merge branch 'sea-query-v0.27' into feature/issues-969_sea-query-binder 2022-09-08 12:59:09 +03:00
Ivan Krivosheev
ecbd7c2713 issues-969 Update dependencies
issues-969 Fix sqlx_query function
2022-09-08 12:56:32 +03:00
Ivan Krivosheev
bac22d30c5 issues-969 sea-query-binder make optional
Update Cargo.toml

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2022-09-08 12:55:27 +03:00
Ivan Krivosheev
581684c441 issues-969 Replace sea-query-driver to sea-query-binder 2022-09-08 12:54:37 +03:00
Billy Chan
d016f66a5f
Cargo.toml specify SeaORM homepage 2022-09-02 15:12:16 +08:00
mohs8421
fe6c40dd75
Introducing sqlx-error feature (#750)
* 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>
2022-08-28 11:13:51 +08:00
Billy Chan
af0bc7a0eb
Upgrade SeaORM root's SeaQuery to v0.27 2022-08-24 15:19:15 +08:00
Chris Tsang
13b53369e2 Prepare for 0.10.0 2022-08-20 22:47:31 +08:00
Chris Tsang
065ab80cd0 0.9.2 2022-08-20 14:06:55 +08:00
Chris Tsang
fad54627cd Update sea-query to 0.26.3 2022-08-20 14:06:55 +08:00
Chris Tsang
632471a526 Update chrono version 2022-08-14 00:46:38 +08:00
Rob Ede
5735c25e69
exclude chrono default features 2022-08-08 15:15:54 +02:00
Ivan Krivosheev
2731878d0e Set minimal rustc version 2022-08-07 02:34:43 +03:00