1504 Commits

Author SHA1 Message Date
baoyachi. Aka Rust Hairy crabs
beef8211d8
fix compile error,res args add type (#839)
* fix compile error,res add type

* update .gitignore

* fix compile error

* fix compile error
2022-07-05 16:04:11 +08:00
Billy Chan
e0eb8ecf69
[cli] skip generating entity for ignored tables (#837) 2022-07-05 01:19:36 +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
Billy Chan
1c4acf1402
[cli] remove unused code 2022-07-04 17:36:58 +08:00
Chris Tsang
a97104559a Fix build error 2022-07-02 14:44:39 +08:00
Mateusz
087f8462a6
Parse enum from repr[X] enums with values (#769)
* parse enum from repr[X] enums with values

* fix parsing negative enums variants with repr[X]

* add tests for enum num_value fallback support
2022-07-02 14:31:16 +08:00
Chris Tsang
5ff6063fe1 Reduce CI burden 2022-07-02 14:19:54 +08:00
Chris Tsang
ef6393d5c6 Consolidate feature flags 2022-07-02 14:17:14 +08:00
Chris Tsang
5ff8259799 Changelog 2022-07-01 02:53:32 +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
Chris Tsang
b40ce6ee83 Changelog 2022-07-01 02:47:05 +08:00
Chris Tsang
50f9f5ad2f
Merge pull request #755 from SeaQL/apply-old-pending-migration
Allow old pending migration to be applied
2022-07-01 02:40:37 +08:00
Chris Tsang
166759d489 Changelog 2022-07-01 02:38:33 +08:00
Chris Tsang
55601f2966 Changelog 2022-07-01 02:35:45 +08:00
Chris Tsang
ec881e35a9
Merge pull request #588 from SeaQL/cli-gen-enum-num-variants
CLI generate enum with numeric like variants
2022-07-01 02:10:00 +08:00
Billy Chan
ab2f784701
(de)serialize custom JSON types - 2 (#794)
* de(serialize) custom JSON types

* Rename DeriveTryGetableFromJson -> FromJsonQueryResult

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-07-01 01:27:46 +08:00
Chris Tsang
4be32e7a9f Changelog 2022-06-29 00:44:24 +08:00
Chris Tsang
8a4be1428d Changelog 2022-06-29 00:43:30 +08:00
Billy Chan
1054d6451c
Use file!() macro to avoid manually defining the name of migration (#736)
* Add `DeriveMigrationName`

* CLI migrate generate without replacing migration name

* Update migrations

* Fixup
2022-06-29 00:42:59 +08:00
Billy Chan
75cb269ceb
Custom join on conditions (#793)
* Custom join on conditions

* Try lambda approach

* Implement debug for relation

* Add example without `rev`

* Add more examples

* Docs
2022-06-29 00:27:55 +08:00
Billy Chan
80d35a9d18
cargo fmt 2022-06-28 16:13:38 +08:00
Chris Tsang
6bc76698cc Changelog 2022-06-28 00:31:36 +08:00
Chris Tsang
0ac8054c97 Changelog 2022-06-26 21:19:05 +08:00
Chris Tsang
d074fafdde
Merge pull request #778 from nappa85/master
Stream metrics
2022-06-26 21:18:00 +08:00
smonv
580fa90023
Bump clap version to 3.2 (#706)
* bump clap to 3.1.17

sea-orm-migration: bump clap version to 3.1.17

sea-orm-cli: use clap derive API instead of builder API

sea-orm-migration: use clap derive

* Fix clippy warnings

* Migration CLI verbose with default value

* bump clap to 3.2

Co-authored-by: Thanh Van <tvt@smonv.com>
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2022-06-26 20:52:33 +08:00
Chris Tsang
ca3809a6d3 Tweaks 2022-06-26 19:17:35 +08:00
Chris Tsang
6649eac963 Changelog 2022-06-26 19:16:48 +08:00
Chris Tsang
53e92ccd0e
Merge pull request #791 from liberwang1013/insert-on-conflict
support on conflict in insert query
2022-06-26 19:14:40 +08:00
Chris Tsang
52855f8890 Tweaks 2022-06-26 18:35:18 +08:00
Chris Tsang
7be2836c9b Changelog 2022-06-26 18:35:05 +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
XiaoQu
987c6b55fd
fix #817 add 404 handle for actix 4 example & update readme for (#818)
* feat: add global 404 page

* docs: add cargo-watch install on README file
2022-06-26 15:35:22 +08:00
Billy Chan
8faabf4076
examples: Fix table identifier (#812) 2022-06-22 16:21:23 +08:00
Billy Chan
fff738a706
cargo fmt 2022-06-21 11:12:28 +08:00
Fumitake Kawasaki
091a91fc0a
add zapp to Open Source Project (#803) 2022-06-20 11:40:44 +08:00
Billy Chan
2eb02cfbe0
Fix SeaSchema's SQLx version to ^0.5 (#798) 2022-06-17 12:20:16 +08:00
Chris Tsang
5b5aa07227
Merge pull request #792 from cache-missing/master
 feat(sqlite3): support set sqlcipher key
2022-06-14 19:16:10 +08:00
cache-missing
73af72200a feat(sqlite3): support set sqlcipher key 2022-06-13 08:42:14 +08:00
Chris Tsang
4301383b40 Tweaks 2022-06-12 22:30:34 +08:00
Chris Tsang
086b0f1645 Changelog 2022-06-12 22:27:12 +08:00
Billy Chan
9b41f1c1b1
Migration shouldn't depends on symbol provided by entity crate (#785)
* Migration shouldn't depends on symbol provided by entity crate

* Add docs
2022-06-12 22:25:32 +08:00
Billy Chan
5cf4d6022b
Vector of string save as serialized format in db (#783) 2022-06-12 22:23:30 +08:00
kyoto7250
0ce8ee6a31
feat(sea-orm-cli): output log about generated file name. (#735)
* feat(sea-orm-cli): output lof about  generated file name.

https://github.com/SeaQL/sea-orm/issues/722

* include column names in info

* cargo fmt

* Update sea-orm-cli/src/commands.rs

Avoid multiple initializations

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

* show info per column

* refactor: use write! macro

* Refactoring

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2022-06-12 20:30:49 +08:00
Tricked
e4f198fbc4
Create .gitattributes (#712) 2022-06-12 20:20:28 +08:00
Liber Wang
41ce3e7817 support on conflict in insert query 2022-06-10 21:18:53 +08:00
Billy Chan
1ea8b457bf
Bump CI actions/cache to v3 (#784) 2022-06-02 16:34:59 +08:00
Aslam Ahammed
a0925cc867
Update COMMUNITY.md (#776)
Add `actix-react-starter-template` in Built with SeaORM to the Open Source Projects section.
Reference: https://github.com/aslamplr/actix-react-starter-template/issues/1
2022-06-01 16:53:58 +08:00
Marco Napetti
0e1c825e9e Stream metrics 2022-05-31 12:38:38 +02:00