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
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
Chris Tsang
a6646cdd2d
cargo fmt
2023-04-26 21:42:18 +08:00
Chris Tsang
9e5900e25b
cargo fmt
2023-04-26 21:41:45 +08:00
Chris Tsang
2746271190
Changelog
2023-04-26 21:32:16 +08:00
Billy Chan
e6b6629733
Revert SeaORM prelude
...
Add `stream_partial_model` to `Select<E>` and `SelectTwo<E,F>`
Minor refactoring
fmt
Add `into_partial_model` to `Cursor<S>`
refactoring
Add test cases
Fix test cases
More test cases
Move partial_model tests
2023-04-26 18:28:53 +08:00
ForzenString
744e063222
add SelectColumns
only modify select columns
...
add `PartialModelTrait` for a part of model
re-export `PartialModelTrait`
cargo fmt
add fn`into_partial_model` on `Select`&`SelectTwo`
add `DerivePartialModel` to impl `PartialModel`
add macro `DerivePartialModel` to `sea-orm`
disambiguate `SelectColumns` function
fix macro error
cargo fmt && cargo clippy
move `SelectColumns` from helper.rs to traits.rs
cargo fmt
Reduce nest hell of load attribute argument fetch
✅ test `DerivePartialModel` input parse
`DerivePartialModel` not derive with generic
fix `DerivePartialModel` code generate error
remove unused use
cargo fmt
add `into_partial_model` for `SelectTwoMany`
2023-04-26 18:28:44 +08:00
Billy Chan
d45bb5b304
Support composite primary key of length up to 12 ( #1508 )
...
* feat: support composite primary key of length up to 12
* induction proof
* docs
* revert tests
* testing cursor by 4+ columns
2023-04-13 16:18:47 +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
Reverier
1161bc0f4a
set unselected Column
of type Option<T>
to None ( #1513 )
...
* Support `None` value for unselected Optional columns, closes #1507
* Support `None` value for unselected Optional columns, closes #1507
* fix rustfmt and cfg control issues
* add test case for #1513
2023-03-16 21:24:58 +08:00
Billy Chan
2407597870
clippy
2023-02-23 20:34:28 +08:00
Billy Chan
91c4930391
Cleanup panic and unwrap ( #1231 )
...
* Add clippy linter checks
* Mock
* InnerConnection
* panic -> Err
* panic -> Err
* More panic -> Err
* Replace unwrap
* Fix clippy
* add clippy linters
* Refactor
* Dump DbErr::Mock
* Revert if...else rewrite
* Remove except
* DbErr helper functions
* Fix clippy
* Negative SQLite last_insert_rowid throw unreachable
* Update panics docs
* Fixup
* Fixup
* Fixup
* Fixup
* Revert adding `ExecResultHolder::Disconnected`
* More fixup
* Fix
* Revert adding `QueryResultRow::Disconnected`
* Fix
* Refactoring
* Fix
* Refactoring
* More refactoring
* More refactoring
* Fix
* Revert `InnerConnection::Disconnected`
* Revert breaking changes
* Fix
* Fix
* Fix
* Refactor `.take().expect()`
* Revert changing `if ... else` to `match` block
* Revert changing return type of `MockDatabaseConnection` transaction method
* Borrow sqlcipher_key
* Fetching unsupported type from query result will thrown `DbErr::Type(...)` error
* Revert adding `DatabaseConnection::try_into_transaction_log()` method
* Refactoring
* Refactoring
2023-02-02 00:02:53 +08:00
Billy Chan
b21abf617f
Fix clippy warnings ( #1437 )
2023-01-31 16:46:44 +08:00
Billy Chan
51e6ad7170
Cast primary key column inside returning expression of insert statement ( #1427 )
2023-01-29 12:58:32 +08:00
Billy Chan
71dbffc725
Fix clippy ( #1426 )
...
* Fix clippy
* Fix clippy
2023-01-27 18:50:20 +08:00
Chris Tsang
b3e4d1c1cf
RecordNotFound -> RecordNotUpdated
2023-01-25 15:43:44 +08:00
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
Chris Tsang
03207fbda9
Use rows_affected
when DB does not support returning
2023-01-18 21:18:04 +08:00
Chris Tsang
a465d1ebac
Refactor 2
2023-01-18 20:46:02 +08:00
Chris Tsang
07d5f781ca
Refactor
2023-01-18 20:08:10 +08:00
Chris Tsang
e5b69ebb73
Don't call last_insert_id if not needed
2023-01-18 19:06:06 +08:00
LeoniePhiline
f03424e7f7
fix(docs): Fix a small typo ( #1391 )
2023-01-18 18:45:35 +08:00
Billy Chan
e9df3aa01d
Casting columns as a different data type on select, insert and update ( #1304 )
...
* Cast select and value
* Refactoring
* Test casting Postgres citext
* Fixup
* Revert
* Add test cases
* Fixup
* Rename methods
2023-01-12 14:56:11 +08:00
Billy Chan
0756adf647
find_by_id
and delete_by_id
take any Into primary key value (#1362 )
2023-01-11 15:28:10 +08:00
Billy Chan
c49a8ac843
Fix merge conflict ( #1386 )
...
* Fix merge conflict
* remove unnecessary clone
2023-01-11 15:27:34 +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
b5e984ca4a
Postgres insert many will throw RecordNotInserted error if non of them are being inserted ( #1021 )
2023-01-11 14:16:35 +08:00
Billy Chan
4f5a15a99f
Support various UUID formats that are available in uuid::fmt
module ( #1325 )
...
* Support various UUID formats that are available in `uuid::fmt` module
* clippy
* fixup
2023-01-11 14:13:15 +08:00
Chris Tsang
23ee592dae
Changelog
2023-01-10 15:29:02 +08:00
Chris Tsang
4210526ec1
Merge pull request #1311 from SeaQL/select-into-tuple
...
Select into tuple
2023-01-10 15:20:14 +08:00
Chris Tsang
3ae44a0abd
One more tweak
2023-01-09 15:46:41 +08:00
Chris Tsang
d14e4a2160
Fix again
2023-01-09 15:20:01 +08:00
Chris Tsang
5c93253877
Tests
2023-01-09 14:46:19 +08:00
Chris Tsang
f0634c2451
Well clippy
2023-01-09 14:26:11 +08:00
Chris Tsang
566dac0661
Docs
2023-01-09 14:11:57 +08:00
Chris Tsang
a11c57d337
Introduce ColIdx
2023-01-09 14:02:23 +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
5291c7f551
clippy
2022-12-20 15:56:37 +08:00
Billy Chan
2f00a8757d
Merge branch 'master' into select-into-tuple
2022-12-20 15:51:06 +08:00
Billy Chan
3cd834d40c
docs
2022-12-20 15:43:03 +08:00
Billy Chan
ccca35ab1a
clippy
2022-12-16 16:48:16 +08:00
Billy Chan
70c4a3a23e
Select into tuple
2022-12-15 21:24:10 +08:00
Billy Chan
3de0078a31
Optimize TryGetableFromJson ( #1249 )
2022-12-01 13:23:24 +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
d082340848
Composite key cursor pagination ( #1216 )
...
* Composite key cursor pagination
* Fix Composite key of 3
2022-11-14 14:26:56 +08:00
Jacob Trueb
cf4657e127
Add Insert query execution without RETURNING clause ( #1208 )
2022-11-11 11:16:05 +08:00
e-rhodes
69612fa507
Fix typo in error name ( #1180 )
...
* fix typo in error name
* fixed typo in docs
Co-authored-by: erhodes <erik@space-nav.com>
2022-11-06 14:18:07 +08:00
Marco Napetti
9d25ee9ac1
use GAT to elide StreamTrait lifetime ( #1161 )
2022-11-06 12:55:21 +08:00
Billy Chan
fdb3cff29f
SQLite support time
crate ( #995 )
...
* SQLite support `time` crate
* Serialize time types for SQLite query results
2022-10-27 14:35:39 +08:00