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
71dbffc725
Fix clippy ( #1426 )
...
* Fix clippy
* Fix clippy
2023-01-27 18:50:20 +08:00
Chris Tsang
bb5dead0c8
Docs
2023-01-12 13:55:39 +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
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
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
43495de0aa
Fix clippy warnings - 1 ( #967 )
...
* Fix clippy warnings
* cargo fmt
* Fix clippy warnings
* cargo fmt
2022-08-12 20:02:53 +08:00
Shouvik Ghosh
12f66618f9
Added delete_by_id ( #590 )
...
* Added delete_by_id
* Added an integration test
* Added composite key example
* Remove extra find_by_id in delete_by_id test
* Added unit test with composite primary key
2022-03-21 14:41:05 +08:00
Chris Tsang
6120d82924
cargo fmt
2021-12-26 00:36:33 +08:00
Chris Tsang
47cbf50c3c
Merge branch 'master' into pulls/361
2021-12-25 17:41:29 +08:00
Billy Chan
5104cd3573
Insert & Update Return Model
( #339 )
...
* Update insert & update API
* Update test cases
* Update README
* Fix clippy warnings
* Fixup
* Fixup
2021-12-18 14:30:10 +08:00
Billy Chan
af1ffdad83
Rename sea-strum
lib back to strum
2021-12-07 17:21:03 +08:00
Billy Chan
7298fdeda9
Rewrite doctests
2021-11-16 17:35:49 +08:00
Billy Chan
4c147a2d24
Rewrite doctests
2021-11-16 16:27:54 +08:00
Billy Chan
9655805316
Will fail, as expected
2021-11-16 15:54:17 +08:00
Billy Chan
d5de8b1c48
Should fail
2021-11-16 15:38:22 +08:00
Billy Chan
fd50ffd5ea
Merge remote-tracking branch 'origin/master' into returning
2021-11-16 14:44:12 +08:00
Chris Tsang
5f2fa55253
Edit docs
2021-11-14 16:58:52 +08:00
Billy Chan
4d44827d2f
Docs
2021-11-11 13:30:36 +08:00
Billy Chan
50605c731b
FIXME: breaking behaviors
2021-11-05 22:39:25 +08:00
Charles Chege
870ca3ffb0
Run fmt --all
2021-10-30 12:00:07 +03:00
Charles Chege
e0023611a2
Improve documentation for the drivers and the entity
...
Provide module level code example on how to create an Entity, Model, ActiveModel, Column and PrimaryKey
2021-10-30 11:15:43 +03:00
Charles Chege
db098d1a03
Documetation for the entity module
2021-10-29 10:39:16 +03:00
Chris Tsang
a2ec6cd351
Rename MockTransaction -> Transaction
2021-10-07 18:00:11 +08:00
Chris Tsang
df4df87d09
Rename Transaction -> MockTransaction
2021-10-04 21:37:12 +08:00
Marco Napetti
02ebc9745c
Transaction 3
2021-10-04 11:39:16 +08:00
Chris Tsang
85eadd38d2
Change mock connector behavior to mock Postgres regardless of feature flags
2021-09-28 13:57:44 +08:00
Chris Tsang
bfa66915e3
Update Entity::update example
2021-09-21 11:10:54 +08:00
Chris Tsang
b1b5f95c1d
Unit tests
2021-09-17 22:22:10 +08:00
Billy Chan
f4d1a52791
Change update behavior, add ActiveModel insert & update
2021-09-10 12:56:41 +08:00
Billy Chan
a5b230f67c
Add back panics
2021-09-06 22:30:51 +08:00
Billy Chan
26cd0846d2
Remove generics on find_by_id
2021-09-06 22:30:51 +08:00
Billy Chan
5060890888
cargo +nightly fmt
2021-09-03 14:56:58 +08:00
Billy Chan
5fbc7b146a
Refactoring & Testing
2021-08-31 18:31:01 +08:00
Billy Chan
caa85d7fba
Try typed mull value SeaQL/sea-query#107
2021-08-21 22:56:48 +08:00
Billy Chan
09c328bb0d
Use smol async-runtime and require one of the supported runtime for integration tests
2021-08-21 22:56:48 +08:00
Billy Chan
2cfaa34a33
Test against all supported runtime
2021-08-21 22:56:48 +08:00
Billy Chan
b7408dda30
Support schema prefix when specifying table name
2021-08-14 18:43:07 +08:00
Chris Tsang
c1ac7baae9
cargo fmt
2021-08-08 16:13:27 +08:00
Chris Tsang
31bee96798
Use sea-strum
2021-08-08 02:17:33 +08:00
Chris Tsang
9334d4ff5d
DbBackend alias
2021-07-17 22:03:41 +08:00
Chris Tsang
ca9aa01f6b
Docs
2021-07-16 22:32:42 +08:00
Billy Chan
e83cc63e3a
Replacing Syntax
& *BuilderBackend
with DatabaseBackend
2021-07-16 00:28:03 +08:00
Billy Chan
d59ee1e298
Mock any database
2021-07-14 21:31:59 +08:00
Billy Chan
ce32967a95
Add base_entity doc
2021-07-12 11:12:32 +08:00
Billy Chan
3659abbf0a
Improve doc test
2021-07-09 10:55:53 +08:00
Chris Tsang
7e3bc1c7b3
Delete many
2021-06-28 01:36:28 +08:00
Chris Tsang
688891f706
Use MockDatabase in doc test
2021-06-27 16:15:56 +08:00
Chris Tsang
cbf16102c0
has_one and belongs_to
2021-06-22 15:52:22 +08:00
Chris Tsang
d77a7c8ab4
Has many relation to be auto defined
2021-06-22 01:30:21 +08:00