2259 Commits

Author SHA1 Message Date
Aidan Gauland
b14a88f7ae
Expose sea-orm feature flags in sea-orm-migration (#1775)
Some features of the sea-query language are unavailable in migrations with the default feature flags, so we need to be able to enable them in sea-orm-migration
2023-07-24 04:53:04 +08:00
Chris Tsang
2335fe9d35 Changelog 2023-07-22 00:57:54 +08:00
Billy Chan
9b54797dd7
Upgrade SQLx to v0.7 (#1742)
* Upgrade SQLx to v0.7

* Refactoring

* Fixup

* Bump SeaSchema version

* Fixup

* Refactoring

* Refactoring

* dep

* Bump

* Update sea-schema

* Update sea-schema

---------

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2023-07-22 01:56:48 +08:00
Chris Tsang
9f47b88748 Changelog 2023-07-21 22:22:34 +08:00
Niklas Korz
73a57836fa
sea-orm-codegen: PostgreSQL enum arrays (#1678)
* sea-orm-codegen: PostgreSQL enum arrays

* Refactoring

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2023-07-21 21:45:11 +08:00
Billy Chan
217894ddad
Drop git2 dependency (#1769)
* Change of API of SeaSchema 0.12

* [CLI] replace `git2` with `glob`
2023-07-21 21:44:43 +08:00
Billy Chan
c64a46a683
[CI] Compile & test each examples on a single instance (#1767)
* Try

* Try

* Ignore examples root folder

* Try

* Try

* Try

* Try

* Try

* Try
2023-07-20 21:46:52 +08:00
Chris Tsang
09c416744f Changelog 2023-07-13 16:55:04 +01:00
Chris Tsang
a5f2ae69e9 Organize entity prelude 2023-07-13 16:53:24 +01:00
Chris Tsang
e8b1c0b975 Docs 2023-07-13 16:39:41 +01:00
Chris Tsang
d920fc3eda Changelog 2023-07-13 16:33:03 +01:00
darkmmon
fd4aab7a8c
Connection acquire expand (#1737)
* Try connection pool acquire timeout

* expanded ConnectionAcquire Errors, and adjusted relevant functions

* updated to include ClosedConnection
removed unknown as variant of ConnectionAcquireError
updated DbErr Eq

* revert mistakenly edited code

* prolonged the timeout time for connection timeout tests

* Revert "prolonged the timeout time for connection timeout tests"

This reverts commit 04d98cf1fdafe64dbe6168b3bbcdcc813329ac4c.

* Error PartialEq & Eq

* fn conn_acquire_err

* refactor code with conn_acquire_err

* fmt

* error msg

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2023-07-13 23:24:12 +08:00
Chris Tsang
500e761a68 Changelog 2023-07-13 16:00:37 +01:00
Chris Tsang
7352008e0e Changelog 2023-07-13 15:43:23 +01:00
Chris Tsang
3629b91d01 Do not deprecate default_value 2023-07-13 15:16:55 +01:00
Diwakar Gupta
1ba37b61d5
Add default_expr support for ColumnDef (#1474)
* Add default_expr support for ColumnDef

* added test for attribute `default_value`

* Implements `PartialEq` for `sea_query::SimpleExpr`

* RcOrArc

* Re-export `sea_query::Expr` in `sea_orm::entity::prelude`

* Add default_expr support for ColumnDef

* added test for attribute `default_value`

* Implements `PartialEq` for `sea_query::SimpleExpr`

* RcOrArc

* Re-export `sea_query::Expr` in `sea_orm::entity::prelude`

* Deprecate `ColumnDef::default_value()`

* Add `ColumnDef::default()`

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2023-07-13 22:09:53 +08:00
Chris Tsang
4953e37a34
Merge pull request #1755 from SeaQL/derive_iden
Remove sea-query's Iden macro; introduce DeriveIden
2023-07-13 21:51:26 +08:00
Chris Tsang
c2d1968627 Reinstate Table => type_name semantic 2023-07-13 11:30:34 +01:00
Chris Tsang
ae899d6744 Remove sea-query's Iden macro 2023-07-13 10:36:56 +01:00
darkmmon
866025a733
implement DeriveIden in sea-orm only (#1740)
* WIP, implementing Iden

* completed implementation for DeriveIden and added basic test cases

* added feature flag to prevent sea-orm::sea-query::DeriveIden from crashing when sea-query is not used

* fixed doc test and adjusted test case

* enable `sea-query-derive`'s `sea-orm` feature

* Bump `sea-query-derive` to v0.4

* Update Cargo.toml

* Update Cargo.toml

* adjusted test cases and updated so that iden attribute will not be snake cased

* Update Cargo.toml

* Update main.rs

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2023-07-13 16:28:35 +08:00
Chris Tsang
b4c1a692f5 Edit 2023-07-12 20:26:35 +08:00
Billy Chan
d09ca3ea77
CHANGELOG 2023-07-12 19:10:37 +08:00
Billy Chan
288f73de21
Upgrade strum to v0.25 (#1752)
* Upgrade `strum` to v0.25

* CHANGELOG

---------

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2023-07-12 19:05:58 +08:00
Billy Chan
a55162e3b8
CHANGELOG 2023-07-12 18:41:19 +08:00
Billy Chan
1b903f73d8
CHANGELOG 2023-07-12 17:37:25 +08:00
Billy Chan
4c682539b6
CHANGELOG 2023-07-12 17:03:28 +08:00
Billy Chan
df390ff7ce
CHANGELOG 2023-07-12 15:22:21 +08:00
Chris Tsang
bdddb3163d Changelog 2023-07-10 21:57:52 +08:00
Chris Tsang
727d83c9d7 Docs 2023-07-10 21:55:26 +08:00
Chris Tsang
07b1e78226
Merge pull request #1677 from SeaQL/update-many-with-returning
Update many with returning
2023-07-10 22:02:07 +08:00
Chris Tsang
d7a978642e Do not throw RecordNotUpdated error 2023-07-10 20:17:34 +08:00
Billy Chan
53caf94af9 Update many with returning 2023-07-10 20:16:58 +08:00
Billy Chan
1b72b35319
CHANGELOG 2023-07-10 17:40:28 +08:00
darkmmon
19e761e73d
moving bae2 into sea-orm local system (#1739)
* imported bae2 into sea-orm local system

* doc update

* fix doc

* Remove sea-bae from the workspace

* Use sea-bae

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2023-07-10 16:11:58 +08:00
Billy Chan
be83092be9
CHANGELOG 2023-07-10 12:12:55 +08:00
darkmmon
902c0ed5ff
DeriveDisplay macro for enum (#1726)
* WIP

* WIP

* WIP

* changed from storing ident to storing TokenStream internally

* Push for code sharing

* fmt

* changing test target to string

* updated Display not showing extra single quote, fixed clippy

* removed DeriveDisplay for test case not using display trait

* added test cases for display_value attribute

* Remove useless clone

* Add comment

* Remove useless clone

* Rename method

* Refactoring

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2023-07-10 11:51:19 +08:00
Billy Chan
ef89463250
CHANGELOG 2023-07-10 10:49:16 +08:00
darkmmon
f5a7311794
Derive value type (#1720)
* progress (WIP)

* WIP

* WIP, finished structure except impl programming

* WIP

* revert event_trigger modification

* adding tests and mods

* completed derive value type

* fixed tests, adjusted code position and completed error messages

* column type commit

* added attribute array_type and column_type for specification

* renamed items and files, and removed debug messages

* move attributes outside of the wrapper struct

* refactored code for type matching, and restructured code in test cases

* clippy fix

* fix(doc): fix salvo framework name (#1731)

Co-authored-by: 黄景祥 <jingxiang.huang@baishancloud.com>

* fmt

* changed json_vec_test to use DeriveValueType

* fmt

* Revert "changed json_vec_test to use DeriveValueType"

This reverts commit 92bbf3b6e4eca72e0af0af35776aeec3ee035602.

* added test cases for inserting StringVec in a model

* fmt

* Try non-public wrapped type

* Refactoring

---------

Co-authored-by: joelhy <joelhy@gmail.com>
Co-authored-by: 黄景祥 <jingxiang.huang@baishancloud.com>
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2023-07-10 10:48:20 +08:00
Billy Chan
207c008e5b
Unused import 2023-07-08 08:23:05 +08:00
Chris Tsang
7c57020cf5 Changelog 2023-07-08 00:16:52 +08:00
darkmmon
2640565082
upgrade version for ouroboros (#1724) 2023-07-08 00:50:12 +08:00
Chris Tsang
a42a9a1d3d update examples 2023-07-08 00:14:02 +08:00
Chris Tsang
4e8d0b0c0c 0.12.0-rc.4 2023-07-08 00:14:02 +08:00
Chris Tsang
eacd71f3a6 Changelog 2023-07-08 00:10:42 +08:00
Chris Tsang
f3fb347589
Merge pull request #1743 from SeaQL/find_with_linked
Find with linked (cont'd)
2023-07-08 00:21:31 +08:00
Chris Tsang
6dc19d97bd Support tuple primary key (as the old impl does)
Also, r_model is optional (same as the old impl)
2023-07-07 23:16:10 +08:00
darkmmon
50a7048deb Adding find_with_linked (#1728) 2023-07-07 22:19:45 +08:00
Billy Chan
acca634e03
Revert "Upgrade SQLx to v0.7"
This reverts commit 832fabf8ff296896231c0d00bc42ecde779c6d5f.
2023-07-07 16:31:15 +08:00
Billy Chan
832fabf8ff
Upgrade SQLx to v0.7 2023-07-07 16:30:21 +08:00
Billy Chan
325e73468e
fmt 2023-07-05 13:03:46 +08:00