2231 Commits

Author SHA1 Message Date
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
joelhy
986f0c2d49
fix(doc): fix salvo framework name (#1731)
Co-authored-by: 黄景祥 <jingxiang.huang@baishancloud.com>
2023-06-29 23:44:52 +08:00
Chris Tsang
4905dc5fde Changelog 2023-06-26 20:30:30 +08:00
darkmmon
64342b105c
Upgrading to syn v2 (#1713)
* resetted and re-did the changes

* fmt

* upgraded to syn2 for sea-orm-codegen

* Rename `bae2`

* Drop the use of `#[sea_orm(table_name = "col_name")]` in `DeriveColumn`

* unified derived input metadata parsing filter

* Propagate errors

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2023-06-26 20:15:37 +08:00
Billy Chan
35c274818b
CHANGELOG 2023-06-26 11:08:09 +08:00
ccQpein
e8eac61c3f
Update readme temp (#1723) 2023-06-26 11:06:04 +08:00
Billy Chan
faf222698c
[CI] Fix example fmt (#1719)
* [CI] Fix example fmt

* CI should failed, try the fmt check still works

* Revert "CI should failed, try the fmt check still works"

This reverts commit 2fea8a236b94e677a32ca89415153e53eb600279.
2023-06-23 19:07:49 +08:00
Billy Chan
d464cbc9be
COMMUNITY 2023-06-23 18:36:53 +08:00
Chris Tsang
c4f1a3c4af Give up
This reverts commit 27af2c9c056be580d22d3a32fd0f766cf4443e3c.
2023-06-22 17:05:33 +08:00
Chris Tsang
27af2c9c05 cargo fmt check 2023-06-22 07:42:48 +08:00
Chris Tsang
6d40569164 Update build script 2023-06-22 07:07:53 +08:00
Chris Tsang
6bb7bb30fa update examples 2023-06-22 07:06:48 +08:00
Chris Tsang
b45534c8c2 0.12.0-rc.3 2023-06-22 07:00:42 +08:00
Chris Tsang
320cbf5b75 Remove nightly from Examples 2023-06-22 16:08:09 +08:00
Chris Tsang
ec198060c3 Prepare for rc.3 2023-06-22 06:48:39 +08:00
Chris Tsang
1f3fa1dc19 Changelog with Tweaks 2023-06-21 23:14:57 +08:00
darkmmon
6e7950158a
Do nothing on conflict (#1712)
* added Conflicted to TryInsertResult

clippy changes

fmt

change from basic if statement to matches

* changed to early return
2023-06-21 22:47:17 +08:00
Chris Tsang
f7398d1c5c Fixup 2023-06-20 17:59:58 +08:00
Chris Tsang
20312b776d Revert "Changelog"
This reverts commit 5e5aa7cbd184db141446960e7960d12c9a61363a.
2023-06-20 17:31:25 +08:00
Chris Tsang
40ee2b29ee Changelog 2023-06-20 17:30:16 +08:00
Chris Tsang
5e5aa7cbd1 Changelog 2023-06-20 17:23:05 +08:00
darkmmon
92ea837cdf
Make insert statement not panic when inserting nothing (#1708)
* end-of-day commit (WIP)

* progress commit (WIP)

* refactored and added InsertAttempt

* async asjusting

* completed implementation for insertAttempt in execution
Added in tests for insertAttempt

* updated wording for new INSERT type

* removed InsertTrait
2023-06-20 17:17:18 +08:00
Tsiry Sandratraina
7c6ab8fa2d
Update COMMUNITY.md (#1710) 2023-06-19 17:43:27 +08:00
Billy Chan
5c75a53614
CHANGELOG 2023-06-19 17:19:28 +08:00
darkmmon
b37e7655f8
Added enum for SQLx Error and basic functions for it (#1707)
* Added enum for SQL Error and basic functions for it

* fmt

* Restructured code to allow multiple database system simultaneously

* updated code error and moved Eq to derive by compiler

* added ForeignKeyViolation implementation

* fmt

* added type param

* changed type param and used unwrap_or_default instead of unwrap

* fmt

* refactor code and update documentation

* updated some error code and fixed formatting

* create SQL Err test for UniqueConstraintViolation

* fmt

* updated error codes for mysql errors

* added test for ForeignKeyConstraintViolation and removed unused imports/codes

* fmt

* updated doc and error message

* added static str in SqlErr

* changed to add error message into SqlErr as String

* updated test file to check database type through connection

* fmt

* updated test for SqlErr to match the error type only

* Removed comment and fixed grammar mistake

* fmt

* Update src/error.rs

* Refactoring

---------

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2023-06-19 17:19:08 +08:00
Billy Chan
c477f67190
COMMUNITY 2023-06-13 21:14:59 +08:00
Billy Chan
fc1a5475b4
CHANGELOG 2023-06-13 21:07:20 +08:00
darkmmon
0816faa7f1
#1696 fix (#1702)
* Test suit load environment variable from env files

* Added expr() and exprs() for QuerySelect trait and Minor typo fix

* fmt

* Added doc testing for the new functions

* Remove excess comment for doc test

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>

* Remove excess comment for doc test

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>

* updated doc tests to make example more realistic

* changed doc test again for more realistic query and added expr_as()

* aligned expr_as() alias input with column_as() input

* update doc test for expr_as() according to previous changes

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2023-06-13 21:01:15 +08:00
Billy Chan
d35cd6aa3b
Test suit load environment variable from env files (#1701) 2023-06-12 17:19:30 +08:00