189 Commits

Author SHA1 Message Date
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
Chris Tsang
0db2575461 0.9.1 2022-07-22 00:14:26 +08:00
Chris Tsang
ad5a566a17 0.9.0 2022-07-12 00:25:47 +08:00
Chris Tsang
324c6c8793 Pin dependencies 2022-07-11 23:53:24 +08:00
Billy Chan
d6831e5295
Bump version of sqlx, sea-query, sea-schema, time and uuid (#834)
* Bump version of sqlx, sea-query, sea-schema, time and uuid

* PostgreSQL `u32` was wrapped in `Oid` (launchbadge/sqlx#1602)

* Update test cases

* Fix clippy warnings

* cargo fmt

* Fix clippy warnings

* Bump sea-schema to ^0.9.2

* Update test cases

* Pin on sea-query minor version
2022-07-05 01:05:11 +08:00
Chris Tsang
a97104559a Fix build error 2022-07-02 14:44:39 +08:00
Chris Tsang
ef6393d5c6 Consolidate feature flags 2022-07-02 14:17:14 +08:00
Chris Tsang
52855f8890 Tweaks 2022-06-26 18:35:18 +08:00
SandaruKasa
4f26b4a585
sqlx_logging_level, a wrapper around sqlx::ConnectOptions::log_statements (#800)
* sqlx_logging_level

* ` = { version = "..." }`
2022-06-26 18:29:44 +08:00
Chris Tsang
12ec00272c Revert "Cursor Pagination (#754)"
This reverts commit 6f9dbd260e6e004c369abe0019b4374253db7d3b.
2022-06-26 18:23:47 +08:00
Billy Chan
6f9dbd260e
Cursor Pagination (#754)
* Cursor pagination

* Apply filter / range filter on cursor; Allow non-primary key filter

* Fixup

* Update cursor API

* Cursor pagination with composite keys

* Docs
2022-06-26 17:48:00 +08:00
Chris Tsang
018ea94912 0.8.0 2022-05-10 00:07:57 +08:00