91 Commits

Author SHA1 Message Date
Sam Samai
71926cfd4b Merge branch 'master' into ss/rocket-example
# Conflicts:
#	Cargo.toml
2021-09-03 22:33:16 +10:00
Billy Chan
7f38621c3c
Set clippy deny 2021-09-03 14:26:57 +08:00
Sam Samai
5f47421b38 Remove sqlx dir and clean up 2021-09-02 21:47:55 +10:00
Sam Samai
b825df1331 Get db_url from Db in run_migrations 2021-09-02 21:33:28 +10:00
Sam Samai
13364ab63c Use the database url in Rocket.toml to connect to mysql/postgres 2021-09-01 19:59:29 +10:00
Billy Chan
dfe26f9b7c
Without direct rocket dependency 2021-08-30 22:34:02 +08:00
Billy Chan
4e5a8d2dc5
WIP 2021-08-29 20:57:25 +08:00
Sam Samai
1126aae479 Generalize over MySQL and Postgres 2021-08-29 21:37:55 +10:00
Billy Chan
3bada7fbc3
WIP 2021-08-29 12:05:55 +08:00
Billy Chan
ccfda51a5e
WIP 2021-08-28 23:48:13 +08:00
Billy Chan
87d4f09931
Add rocket-mysql driver 2021-08-25 23:05:30 +08:00
Billy Chan
b1d28db5ad
Fix clippy warnings 2021-08-10 11:03:41 +08:00
Billy Chan
22516b8f68 Add Postgres db driver 2021-07-21 19:07:02 +08:00
Chris Tsang
303a0f32d6 cargo fmt 2021-07-19 11:15:31 +08:00
Chris Tsang
9334d4ff5d DbBackend alias 2021-07-17 22:03:41 +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
Chris Tsang
6ff5a32b7a cargo fmt 2021-07-11 22:08:37 +08:00
Chris Tsang
f5ac84f915 Rework DbErr 2021-06-30 23:56:26 +08:00
Chris Tsang
30ac326d5c Rename to DbErr::Exec and DbErr::Conn 2021-06-30 21:21:06 +08:00
Chris Tsang
0298cfb6af Rename to DbErr 2021-06-30 21:17:23 +08:00
Billy Chan
2a1173c174
Add & use OrmError (#36)
* Add & use OrmError

* Rename to SeaErr
2021-06-30 21:08:41 +08:00
Chris Tsang
ad3fb45253 cargo fmt 2021-06-22 01:30:26 +08:00
Chris Tsang
ec290156c5 SQLx SQLite support 2021-06-20 23:04:25 +08:00
Chris Tsang
f9ba6eeb1f Transaction 2021-06-19 16:42:11 +08:00
Chris Tsang
f4611c4939 Refactor 2021-06-19 02:24:45 +08:00
Billy Chan
62fb43c605
Add unit test for pagination (#20)
* Add unit test for pagination

* End with empty page

* Add more test cases

* Assert transaction log

* Test utils

* Feature gated

* IntoMockRow, derive macro with into MockRow

* Revert derive macro

* WIP

* WIP

* assert_transaction_log
2021-06-18 23:43:07 +08:00
Chris Tsang
faffc518ae Mock test case 2021-06-13 23:38:21 +08:00
Chris Tsang
6b7ea75393 Mock Database Connection 2021-06-13 22:20:50 +08:00
Chris Tsang
c7057ab964 Organize code 2021-06-12 17:12:18 +08:00
Chris Tsang
981a5f731d Move code 2021-06-12 16:51:52 +08:00
Chris Tsang
162f6f4331 cargo fmt 2021-06-11 20:10:06 +08:00
Chris Tsang
398e1f0913 From sqlx pool 2021-06-11 15:48:26 +08:00
Chris Tsang
744d62a310 Change one() to return Option<Model> 2021-06-05 23:44:11 +08:00
Chris Tsang
99a1fe01fc cargo fmt 2021-05-27 02:34:14 +08:00
Chris Tsang
fcff91c0e4 Execute interface 2021-05-26 19:05:43 +08:00
Billy Chan
7aaeef834c
Move to separate DeriveActiveModel, cargo fmt 2021-05-25 18:27:44 +08:00
Chris Tsang
1a780d8e4f Move code 2021-05-24 22:29:17 +08:00
Chris Tsang
6ffed93b46 DatabaseConnection 2021-05-07 15:09:07 +08:00
Chris Tsang
7d99d33aa2 Select 2021-05-07 05:57:51 +08:00
Chris Tsang
af4fb2ab7d Initial Commit 2021-05-07 03:35:46 +08:00