Commit Graph

263 Commits

Author SHA1 Message Date
antao
38163a26a6 Modify the interface of the DbClient class 2019-02-16 02:11:30 +08:00
antao
136ab1d460 Modify the interface of the DbClient class 2019-02-16 01:43:04 +08:00
antao
7041783579 Modify code style 2019-02-02 11:34:00 +08:00
antao
ad86c8f66e Modify the SpinLock 2019-02-01 00:32:35 +08:00
antao
245faabfce Use the user space spinlock for performance reasons 2019-01-30 12:27:16 +08:00
an-tao
cbbee440ea Compatible with older versions of gcc 2019-01-29 22:24:32 +08:00
an-tao
d5d90d2f6f Modify code style 2019-01-21 23:59:28 +08:00
an-tao
ef389b6ec9 Organize code style 2019-01-21 22:25:20 +08:00
an-tao
b20114a9d5 Organize code style 2019-01-21 21:28:46 +08:00
antao
a9e9ced331 Use references instead of values in range-based for loop 2019-01-21 17:39:31 +08:00
antao
c26f536255 Update the submodule trantor 2019-01-19 13:50:35 +08:00
antao
7661b8ed88 Change the vertion to 0.9.14 2019-01-15 18:25:54 +08:00
an-tao
f20b9199e1 Increase the size of the sql command bufferr 2019-01-15 18:09:21 +08:00
antao
bbb810949e Modify the DbClientImpl class 2019-01-15 17:55:09 +08:00
antao
7ae8f58bb8 Modify the Result class 2019-01-15 13:21:40 +08:00
antao
0b4fd04228 Modify the genRandomString() function 2019-01-14 17:11:32 +08:00
antao
ffbf244b73 MysqlConnection:Automatic reconnection 2019-01-12 22:18:35 +08:00
antao
cdbb55643a Update the submodule trantor 2019-01-11 18:17:04 +08:00
antao
daff2ec427 Modify the Sqlite3Connection class 2019-01-11 17:24:12 +08:00
antao
cd257203f7 Use read-write lock to avoid the race condition of sqlite3 database operation 2019-01-11 15:01:25 +08:00
antao
52dceb45c2 Modify the constructor of the DbClientImpl class 2019-01-10 19:12:33 +08:00
antao
59a0431512 Add a mutex 2019-01-10 17:54:51 +08:00
antao
4e704d398d Make pg connections automatically reconnect 2019-01-10 15:54:25 +08:00
antao
5f108b510d Name threads 2019-01-09 16:23:34 +08:00
an-tao
08300f93c2 Modify the constructor of the DbClientImpl class 2019-01-09 14:47:07 +08:00
antao
e1b873ba01 Modify the DbClientImpl class 2019-01-09 13:12:07 +08:00
antao
ac90c80710 Use multiple event loops in the db client 2019-01-09 10:46:58 +08:00
antao
937a2fd136 Optimize PostgreSQL client 2019-01-08 19:37:19 +08:00
antao
5ea972e5b3 Modify the signature of the createDbClient() method 2019-01-07 16:26:58 +08:00
antao
baa7ea6a0a Modify the db mapper 2019-01-04 16:19:21 +08:00
antao
f7b853e96c Update the submodule trantor 2019-01-03 13:31:12 +08:00
antao
d8c932218a Move callbacks into lambdas 2018-12-30 15:16:27 +08:00
an-tao
851e6d6647 Fix compiler warnings in Linux 2018-12-29 18:12:13 +08:00
antao
36f7f3331b Merge branch 'sqlite' of https://github.com/an-tao/drogon into sqlite 2018-12-29 18:02:56 +08:00
antao
926ac48b49 Modify drogon_ctl 2018-12-29 18:02:39 +08:00
an-tao
3f5b492858 Fix a bug in Linux 2018-12-29 17:36:41 +08:00
antao
3dc6e6c6c1 Modify eventloop in the Sqlite3Connection class 2018-12-29 16:56:50 +08:00
antao
787120dda4 Add support for sqlite3 models 2018-12-29 13:12:36 +08:00
antao
99a03159c5 Fix bugs of the Sqlite3ResultImpl class 2018-12-29 13:12:36 +08:00
antao
6db8df6bc0 Sqlite3 works, needs more testing 2018-12-29 13:12:36 +08:00
antao
161a964238 Start adding sqlite3 support 2018-12-29 13:12:36 +08:00
antao
fb5bbde277 Modify something to improve performance 2018-12-24 15:06:05 +08:00
antao
53b3eb217f Debug postgresql connections 2018-12-11 15:06:04 +08:00
antao
7132cb32ca Fix a bug of Mapper<> 2018-12-11 13:58:17 +08:00
antao
ed8d05de33 Add the callback for a transaction commit 2018-12-10 18:33:14 +08:00
antao
d242b05cb9 Modify file comments 2018-12-07 15:53:31 +08:00
antao
032aa19a53 Modify file formats and comments 2018-12-07 15:50:18 +08:00
antao
948832640a Update Mapper.h 2018-12-06 18:06:17 +08:00
antao
e8fcc49c37 Add the 'like' to the Criteria class 2018-12-05 09:50:36 +08:00
an-tao
56c2cfb609 Update tests 2018-12-03 18:12:19 +08:00
an-tao
ffbdac36c9 Modify cmake files for the mariadb database on linux 2018-12-03 17:03:45 +08:00
antao
52546b7846 Modify the model generator for time-type columns 2018-12-03 10:13:31 +08:00
antao
458d14591b Modify some strings 2018-12-03 10:13:31 +08:00
antao
25548eaaa0 The mysql client works 2018-12-03 10:13:31 +08:00
antao
aa1f8d4acb Update MysqlConnection.h 2018-12-03 10:13:31 +08:00
antao
8ed5e19f46 Modify model creation 2018-12-03 10:13:31 +08:00
antao
5b26d4587b Fix a bug of the Transaction class 2018-12-03 10:13:31 +08:00
antao
cba0252bc1 Add FindMySQL.cmake to the project generated by drogon_ctl 2018-12-03 10:13:31 +08:00
antao
a0bdcdaae3 Fix a bug of the MysqlResultImpl 2018-12-03 10:13:31 +08:00
antao
6dec023099 Update SqlBinder 2018-12-03 10:13:31 +08:00
antao
64411fa521 Remove mysql stmt execution 2018-12-03 10:13:31 +08:00
antao
de3d3ae3d6 Update the test 2018-12-03 10:13:31 +08:00
antao
4bfe8250e9 Mysql works with 'stmt' 2018-12-03 10:13:31 +08:00
antao
cfe55d5495 Temporary commit 2018-12-03 10:13:31 +08:00
antao
17e765501b The mysql_real_query_start() method works 2018-12-03 10:13:31 +08:00
antao
7c907de7a6 Add the MysqlResultImpl class 2018-12-03 10:13:31 +08:00
antao
d92ce4cf9f Send query 2018-12-03 10:13:31 +08:00
antao
a661d01755 The non-blocking mysql_stmt_prepare works 2018-12-03 10:13:31 +08:00
antao
669c446656 Modify the connection to the Mysql server 2018-12-03 10:13:31 +08:00
antao
6d5b1af726 Update mysql connection 2018-12-03 10:13:31 +08:00
antao
efbf5b4ad5 Add the MysqlConnection class 2018-12-03 10:13:31 +08:00
antao
bd8f32281a Add the #pragma once to the ResultImpl.h file 2018-11-29 19:09:34 +08:00
antao
20f97a78a2 Modify tests path 2018-11-27 18:29:23 +08:00
antao
ca5085c503 Modify the output of the db_test program 2018-11-27 17:52:46 +08:00
antao
81540ca19b Add a database test 2018-11-27 17:37:41 +08:00
an-tao
d1a3f263e2 Fix a bug on 32-bit system 2018-11-23 23:29:46 +08:00
antao
a2c349172a Modify the creation of models 2018-11-23 10:31:45 +08:00
antao
b1193f592f Add some comments 2018-11-22 15:48:45 +08:00
antao
c86dc3f405 Remove the PgClientImpl class 2018-11-22 09:39:33 +08:00
antao
b4621bebb1 Add an intermediate abstraction layer for the database client class 2018-11-21 18:18:10 +08:00
antao
532d69b27f Minor modifications 2018-11-20 18:54:44 +08:00
antao
972b0bf600 Make the database model support the float type 2018-11-20 11:20:57 +08:00
antao
9ee0ef6cc8 Modify the creation of models 2018-11-20 10:54:46 +08:00
antao
ad37969535 1.Fix a memory bug;
2.Support for bytea type of postgreSQL;
2018-11-19 18:15:41 +08:00
antao
801e0c1ca6 Fix a bug for the model of table without primary key 2018-11-19 13:00:15 +08:00
antao
0a54a0de1a Add forUpdate() method to Mapper class template 2018-11-18 18:10:17 +08:00
antao
75d6145b56 Fix errors in the Mapper class template 2018-11-18 00:11:15 +08:00
antao
750d31f107 Support for trantor::Date type in database parameter binding 2018-11-17 11:40:17 +08:00
antao
215fc68fe3 Update version to 0.9.7 2018-11-16 13:56:57 +08:00
antao
13d13ed240 Organize the format of files 2018-11-16 13:26:14 +08:00
antao
5514bfd32a Modify PgClientImpl and PgConnection 2018-11-16 12:58:50 +08:00
antao
6df0f0020c Add some logs 2018-11-15 17:53:24 +08:00
antao
701105fb64 Fix a rollback bug in transactions 2018-11-15 16:22:24 +08:00
antao
2e35a966d3 Add Transaction 2018-11-15 13:49:47 +08:00
antao
1ce440b7f3 Add deleteBy methods in the class Mapper 2018-11-12 16:16:13 +08:00
antao
be58f265dd Update db tests 2018-11-11 12:34:23 +08:00
antao
c2d23abe9f Use shared_ptr to PgClientImpl 2018-11-11 12:02:48 +08:00
antao
11db6673a6 Add delete methods to Mapper 2018-11-10 22:37:01 +08:00
antao
979c6670c9 Modify some function signatures 2018-11-10 21:31:44 +08:00
antao
68cefc76e9 Fix a bug 2018-11-10 20:44:53 +08:00
an-tao
6e5eef9aaf Fix some warnings 2018-11-09 15:55:20 +08:00
antao
de3c31f34b Support timestamp column type 2018-11-09 15:46:39 +08:00
antao
f9cc77daa0 Fix a bug of struct tm 2018-11-09 15:46:39 +08:00
antao
32a7c5aff6 Support composite primary key 2018-11-09 15:46:39 +08:00
antao
acaa604559 Fix some bugs in models 2018-11-09 15:46:39 +08:00
antao
5a56f3b5d3 Fix a bug (Winfinite-recursion) 2018-11-09 15:46:39 +08:00
antao
6810dd261c Modify models template 2018-11-09 15:46:39 +08:00
antao
0d77fa1490 Improve the function of creating models 2018-11-09 15:46:38 +08:00
antao
cae30230c3 Add the create DAO method to drogon_ctl, not completed 2018-11-09 15:46:38 +08:00
antao
85664b86fc Mapper template works 2018-11-09 15:46:38 +08:00
antao
6385330c0f Modify some exception descriptions 2018-11-09 15:46:38 +08:00
antao
054b0a2d68 Add Criteria class 2018-11-09 15:46:38 +08:00
antao
2dcb924c81 Start Adding orm 2018-11-09 15:46:38 +08:00