Billy Chan
207c008e5b
Unused import
2023-07-08 08:23:05 +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
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
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
1e9eb0f46e
Imports cleanup
2023-01-30 12:41:12 +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
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
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
671d79469a
Fixup
2022-10-17 17:25:35 +08:00
Billy Chan
a80c33ef4c
Rewrite enum and text casting ( #973 )
...
* Rewrite enum and text casting
* Add doc tests
* Refactoring
2022-09-05 00:38:12 +08:00
Liber Wang
41ce3e7817
support on conflict in insert query
2022-06-10 21:18:53 +08:00
Billy Chan
cdc70f4fd9
Insert Default ( #589 )
...
* Insert default
* Update sea-query
* Fixup
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-05-09 23:46:38 +08:00
Billy Chan
adfb9ead54
Rework ActiveValue
( #340 )
...
* WIP
* Fixup
* Fixup
* Update docs & rename `unset`
* Deprecate `Unset()` and reexport `ActiveValue::NotSet`
* Docs
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2021-12-19 02:22:30 +08:00
Billy Chan
47e2486ead
Refactoring
2021-11-05 16:25:55 +08:00
Billy Chan
6018d3f1b9
Merge remote-tracking branch 'origin/master' into active-enum
2021-11-02 12:18:37 +08:00
Charles Chege
a9b6f8cc83
Documetation for the query module
2021-10-29 10:38:30 +03:00
Billy Chan
e04495b94d
Refactoring
2021-10-27 11:28:33 +08:00
Billy Chan
fac528a369
Refactoring
2021-10-27 10:58:38 +08:00
Billy Chan
ded28be2c0
Refactoring
2021-10-26 18:58:06 +08:00
Billy Chan
db22e70c63
Refactoring
2021-10-26 17:51:36 +08:00
Billy Chan
2ee376ddd1
Try EnumValue
2021-10-26 16:22:24 +08:00
Billy Chan
20c66b2f05
Refactoring
2021-10-21 15:50:18 +08:00
Billy Chan
80c72004d1
Try Postgres enum
2021-10-21 15:43:50 +08:00
Chris Tsang
3fd33ab53c
Merge branch 'master' into last-insert-id
2021-10-12 13:59:41 +08:00
Billy Chan
2f90207d64
Remove PrimaryKeyValue
trait
2021-10-08 18:10:19 +08:00
Billy Chan
35b8eb9a4d
ActiveValue::take()
& ActiveValue::into_value()
without unwrap()
2021-10-04 12:17:31 +08:00
Billy Chan
5497810afb
Remove unnecessary trait bounds
2021-09-30 11:49:27 +08:00
Billy Chan
f79a417150
Remove ValueType: Default
2021-09-27 18:01:38 +08:00
Billy Chan
5060890888
cargo +nightly fmt
2021-09-03 14:56:58 +08:00
Billy Chan
b7408dda30
Support schema prefix when specifying table name
2021-08-14 18:43:07 +08:00
Chris Tsang
9334d4ff5d
DbBackend alias
2021-07-17 22:03:41 +08:00
Chris Tsang
57097c0ede
Visibility
2021-07-16 16:51:12 +08:00
Billy Chan
e83cc63e3a
Replacing Syntax
& *BuilderBackend
with DatabaseBackend
2021-07-16 00:28:03 +08:00
Billy Chan
56fd77eddf
Build query with syntax
2021-07-16 00:28:03 +08:00
Chris Tsang
c70c941712
Refactor Insert one & many
2021-06-10 01:47:45 +08:00
Chris Tsang
8acba47a69
Doc tests
2021-06-10 00:37:33 +08:00
Chris Tsang
bd9dfbdf37
cargo fmt
2021-06-06 23:21:02 +08:00
Chris Tsang
b148c3906d
Make Val looks like enum variants
2021-06-06 23:03:34 +08:00
Chris Tsang
49ed8b43c7
Tweaks
2021-06-06 18:45:16 +08:00
Chris Tsang
cf0127d89f
Save ActiveModel
2021-06-05 20:30:32 +08:00
Chris Tsang
f706eb261d
Update Statement
2021-06-02 23:59:44 +08:00
Chris Tsang
2169d1284f
Refactor ActiveModelTrait
2021-06-02 22:35:17 +08:00
Chris Tsang
c65cb9687b
Refactor Trait bounds
2021-06-02 19:09:00 +08:00
Chris Tsang
2fc4520ee8
Refactor Query as traits
2021-06-02 00:36:06 +08:00
Chris Tsang
89c743d5a7
QueryTrait
2021-06-01 18:08:18 +08:00
Chris Tsang
ba1eef1671
Move files
2021-06-01 17:32:23 +08:00