Shogo Nakano
3dc66aa17d
refactor: add clear_order_by for num_items ( #2030 )
2024-01-10 18:30:30 +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
2407597870
clippy
2023-02-23 20:34:28 +08:00
Billy Chan
cbd7a8d1c9
Cleanup the use of vec![]
( #1367 )
...
* Public methods accept any IntoIterator as argument
* refactoring
2023-01-11 14:17:06 +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
ccca35ab1a
clippy
2022-12-16 16:48:16 +08:00
Billy Chan
4df9a2672a
Fixup
2022-10-18 19:06:38 +08:00
Chris Tsang
bfab8720b4
Improve error messages #1125
2022-10-17 21:11:16 +08:00
Billy Chan
5f1670329d
Trim spaces when paginating raw SQL ( #1094 )
2022-10-06 23:38:45 +08:00
liberwang1013
fff0c87a6d
replaced usize with u64 in PaginatorTrait ( #789 )
...
undefined
2022-08-20 22:43:17 +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
Eric
5037dc99ec
Create a num_items_and_pages
on the paginator
( #768 )
...
* Create a `num_items_and_pages` on the `paginator`
This method allows us to get both number of items and pages of a
paginator with only one database query.
* Improve documentation
* Create a dedicated struct for items and pages number
2022-07-01 02:50:20 +08:00
shinbunbun
7a86ac0239
Implement PaginatorTrait for SelectorRaw ( #617 )
...
* Implement PaginatorTrait for SelectorRaw
* Implement raw test
2022-03-21 14:37:08 +08:00
Billy Chan
8eb095385d
Migration ( #335 )
...
* Refactor `ConnectionTrait`
* Refactoring
* Build index & foreign key statements
* Fix imports
* Fixup
* Rocket example with migration
* async-std compatible with the tokio 1.0 runtime
* Use reexported dependency
* Compile without selecting any db backend
* Updating sea-orm-cli dep
* sea-orm-cli migrate commands
* cargo fmt
* Test [cli]
* Refactoring
* Clap app name should be "sea-orm-cli"
* Correctly capture MIGRATION_DIR
* Rename README
* Add `sea-orm-cli migrate init` command
* Update README
* Try restructured sea-query dependency (SeaQL/sea-schema#41 )
* Set `DATABASE_URL` environment variable
2022-02-05 20:34:54 +08:00
Billy Chan
7298fdeda9
Rewrite doctests
2021-11-16 17:35:49 +08:00
Billy Chan
4c147a2d24
Rewrite doctests
2021-11-16 16:27:54 +08:00
Chris Tsang
5f2fa55253
Edit docs
2021-11-14 16:58:52 +08:00
Billy Chan
ac804a1642
Imports PaginatorTrait
by default making it backward compatible
2021-11-10 15:26:29 +08:00
Billy Chan
1905f62430
cargo fmt
2021-11-10 14:58:06 +08:00
jasper
05181994d3
Move count to PaginatorTrait
2021-11-10 08:57:05 +08:00
jasper
23498892b0
Add PaginatorTrait and CountTrait
2021-11-09 21:33:55 +08:00
Charles Chege
817e9bdd23
Documetation for the executor module
2021-10-29 10:38:55 +03:00
Chris Tsang
a2ec6cd351
Rename MockTransaction -> Transaction
2021-10-07 18:00:11 +08:00
Chris Tsang
df4df87d09
Rename Transaction -> MockTransaction
2021-10-04 21:37:12 +08:00
Chris Tsang
e7b822c65d
cargo fmt
2021-10-04 11:44:02 +08:00
Chris Tsang
01a5c1c6dd
Fix build errors
2021-10-04 11:43:21 +08:00
Marco Napetti
02ebc9745c
Transaction 3
2021-10-04 11:39:16 +08:00
Chris Tsang
85eadd38d2
Change mock connector behavior to mock Postgres regardless of feature flags
2021-09-28 13:57:44 +08:00
Billy Chan
bb225b12ee
Rocket example page number starts from one
2021-09-20 18:30:31 +08:00
Billy Chan
09c328bb0d
Use smol async-runtime and require one of the supported runtime for integration tests
2021-08-21 22:56:48 +08:00
Billy Chan
2cfaa34a33
Test against all supported runtime
2021-08-21 22:56:48 +08:00
Billy Chan
22649f36a2
cargo fmt
2021-08-06 10:51:34 +08:00
Billy Chan
9c865cbb31
Try to fix count()
2021-08-06 10:48:37 +08:00
Chris Tsang
303a0f32d6
cargo fmt
2021-07-19 11:15:31 +08:00
Chris Tsang
2dc8401c53
Paginator docs
2021-07-17 23:15:08 +08:00
Chris Tsang
9334d4ff5d
DbBackend alias
2021-07-17 22:03:41 +08:00
Chris Tsang
56763a8718
count() on Select
2021-07-17 21:18:20 +08:00
Billy Chan
e83cc63e3a
Replacing Syntax
& *BuilderBackend
with DatabaseBackend
2021-07-16 00:28:03 +08:00
Billy Chan
d59ee1e298
Mock any database
2021-07-14 21:31:59 +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
688891f706
Use MockDatabase in doc test
2021-06-27 16:15:56 +08:00
Chris Tsang
5002c62b40
Use DatabaseConnection in place of Database
2021-06-19 17:28:07 +08:00
Chris Tsang
041d28aa26
Refactor
2021-06-19 16:56:53 +08:00
Chris Tsang
f9ba6eeb1f
Transaction
2021-06-19 16:42:11 +08:00
Chris Tsang
ddcdd33bd5
Fix clippy warnings
2021-06-19 02:49:56 +08:00
Chris Tsang
f4611c4939
Refactor
2021-06-19 02:24:45 +08:00
Billy Chan
62fb43c605
Add unit test for pagination ( #20 )
...
* Add unit test for pagination
* End with empty page
* Add more test cases
* Assert transaction log
* Test utils
* Feature gated
* IntoMockRow, derive macro with into MockRow
* Revert derive macro
* WIP
* WIP
* assert_transaction_log
2021-06-18 23:43:07 +08:00
Chris Tsang
6b7ea75393
Mock Database Connection
2021-06-13 22:20:50 +08:00
Chris Tsang
c7057ab964
Organize code
2021-06-12 17:12:18 +08:00