Commit Graph

312 Commits

Author SHA1 Message Date
Nikolay Mitev
17c80508c0 Drop cpp14 build (#1740)
* Drop C++14 Support

* Update README.md

* Remove drogon::optional in favor of std::optional

* Remove drogon::filesystem in favor of std::filesystem

* Remove boost::string_view and pre-c++17 hacks

* Remove boost::any

* Remove the string_view.h and the any.h

* Remove boost lib

* Update .clang-format and ci

Co-authored-by: Omar Mohamed <omar@omar-laptop.lan>
Co-authored-by: Ken Matsui <26405363+ken-matsui@users.noreply.github.com>
Co-authored-by: An Tao <antao2002@gmail.com>
Co-authored-by: albaropereyra22 <141711575+albaropereyra22@users.noreply.github.com>
Co-authored-by: Yoshihiro Hokazono <47231909+hokacci@users.noreply.github.com>
Co-authored-by: Omar Mohamed Khallaf <51155980+omarmohamedkh@users.noreply.github.com>
2023-08-23 11:49:55 +08:00
VladlenPopolitov
ec5dfdd9f7
Use unsigned char to call the std::isspace function (#1703) 2023-07-30 23:03:06 +08:00
Ken Matsui
75b106599d
Implement QueryBuilder (#1331) 2023-05-22 09:52:19 +08:00
An Tao
abf6f6cc86
Fix a hanging bug when writing large string to text field (postgresql) (#1599) 2023-05-11 09:55:40 +08:00
Nitromelon
5baca75359
Bugfix: PgBatchConnection did not report error message. (#1588) 2023-05-09 19:20:23 +08:00
Sqeaky
fddbc0abb7
Update SqlBinder.h (#1595)
On a fully updated Rasperry Pi OS using Raspberry Pi OS 2023-05-03 Drogon built fine, but a project linking to/including drogon would fail to build with `/usr/local/include/drogon/orm/SqlBinder.h:70:1: error: body of ‘constexpr’ function ‘constexpr T htonT(T) [with T = long unsigned int]’ not a return-statement 70 | }`.

Compiler details:
    $ gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/10/lto-wrapper
    Target: aarch64-linux-gnu
    Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
    Thread model: posix
    Supported LTO compression algorithms: zlib zstd
    gcc version 10.2.1 20210110 (Debian 10.2.1-6)

This is a proposed fix for this issue that adjusts this function to be a pair of IFDEFed return statements based on network byte order as the original function appeared to intend. This makes it so the function body is entirely a single return statement on each platform. 

The error message from the C++17 compiler (which is the latest version supported on Raspberry Pi OS currently) indicates that constexpr functions must be entirely single return statements.
2023-05-09 17:23:47 +08:00
Ostropik
b229f74743
Fix namespaces (#1528)
Co-authored-by: Ostropik <Dmytro.OSTROPITSKYI@ingenico.com>
2023-03-13 17:44:00 +08:00
An Tao
ae9d5f20b3
Postgresql: don't handle events anymore after connection closing (#1499) 2023-02-04 20:06:15 +08:00
Nitromelon
554939d7ee
Fix error when PgListener task queue not empty (#1478)
* Fix error when task queue not empty.

* Update test, listen multiple channels.
2023-01-14 10:16:50 +08:00
Nitromelon
1618484d74
Support postgresql asynchronous notification (LISTEN/NOTIFY). (#1464) 2023-01-04 23:50:49 +08:00
interfector18
c5e596d942
Enable json entry as string (#1440) 2022-11-17 21:56:36 +08:00
Greisberger Christophe
28518b7bba
Fix HttpController regex path matching (#1439)
* Fixed wrong controller method called on regex paths

* Fixed test executables not linking on Windows

* Fixed compilation conversion warnings with explicit casts
2022-11-17 21:56:12 +08:00
An Tao
ab10d8cb22
Fix a dead lock bug when closing all database connections (#1434) 2022-11-11 09:57:18 +08:00
An Tao
990be54ea0
Add some test cases for the sqlite datetime type (#1430) 2022-11-06 17:49:59 +08:00
An Tao
4d63475203
Add support for the string_view type to SqlBinder in orm (#1391) 2022-09-23 21:56:40 +08:00
Nitromelon
cdd48686ab
Small patches on orm_lib. (#1388) 2022-09-23 21:56:14 +08:00
An Tao
d3fe59432b
Use the mysql_library_end() function to avoid memory leaks (#1387) 2022-09-20 10:29:44 +08:00
An Tao
c97125b22f
Fix a conflict of ssize_t type with hiredis (#1371) 2022-09-03 22:36:46 +08:00
An Tao
de1bd805fc
Add a precompilation macro in the pg pipeline test code (#1368) 2022-09-01 00:30:16 +08:00
Ken Matsui
2465753ee9
Refactor db_test.cc (#1346) 2022-08-19 12:22:13 +08:00
Ken Matsui
9abc9e5b6c
Accept postgres for DbClient type as well (#1347) 2022-08-12 19:47:22 +08:00
an-tao
5610bd2182 Change timeout of pipeline test for the CI environment (#1339) 2022-08-02 23:56:47 +08:00
Ken Matsui
c9f5946eff
Implement toJson to convert std::vector to Json::Value` (#1329) 2022-07-28 22:52:52 +08:00
Ken Matsui
82bd6bceac
Refactor orm::SqlBinder (#1328) 2022-07-28 22:10:01 +08:00
Ken Matsui
cfe1681b0f
Omit redundant virtual specifiers (#1325) 2022-07-26 12:19:54 +08:00
Nitromelon
81dd4ebd07
Bugfix: fix Mapper::updateBy() async api. (#1290) 2022-06-21 21:01:29 +08:00
Martin Chang
7570137138
Make orm::Result compatiable with C++ STL container concepts (#1281) 2022-06-12 14:09:56 +08:00
An Tao
ebf87d69d7
Support pipeline mode on PostgreSQL 14+ (#1169)
Co-authored-by: He, Wanchen <hwc14@qq.com>
2022-06-05 21:10:42 +08:00
MQPearth
346e2e6033
Fix deleteFutureByPrimaryKey compile fail (#1271) 2022-06-03 15:30:07 +08:00
An Tao
7af9853589
Clear all database connections before quitting (#1273) 2022-06-03 13:31:56 +08:00
Nitromelon
8ab868ea22
Check mysql-optionsv support in cmake. (#1265) 2022-05-29 15:17:15 +08:00
Nitromelon
1bc38c7e22
Remove redundant resource release. (#1261) 2022-05-26 12:09:48 +08:00
Particle_G
41d9d7ec58
Add support for custom SQL query (#1241) 2022-05-21 15:23:34 +08:00
DualWu
86dbf9875b
add typename for clang-14 (#1226)
Co-authored-by: dualwu <dualwu@zelostech.com>
2022-04-25 19:28:06 +08:00
Omar Mohamed Khallaf
d51bae1016
Enable automatic reconnect in mysql (#1217)
Setting MYSQL_OPT_RECONNECT option to true will allow the connection to
be restablished once before giving up and returning an error.

This is useful in cases where the database is behind a loadbalancer
(e.g. ipvs) and the tcp connection is terminated after some period of
time.
2022-04-22 11:12:49 +08:00
LE GARREC Vincent
8c4896dfec
Fix tolower with cfi sanitizer (#1209) (#1210)
and update trantor with same patch.
2022-04-22 11:08:40 +08:00
davidschedler
b8a6188ad5
Add ‘not like‘ criteria (#1182) 2022-02-23 09:34:51 +08:00
Ichiro
4b31f93767
Add Not In for ORM Criteria (#1176) 2022-02-12 21:59:49 +08:00
pao-lu
720ce4e9ed
Destroy fastdb client on quit (#1142) 2021-12-31 12:31:32 +08:00
Nitromelon
7455355419
Add more method for mapper (#1112) 2021-12-08 00:54:01 +08:00
NitroMelon
e9fafc643d
Support CoroMapper method chaining (#1103) 2021-12-04 20:54:25 +08:00
An Tao
7cf0a64ab6
Fix orm tests (#1099) 2021-12-01 11:18:35 +08:00
Martin Chang
8913abc400
Mark all awaiters as nodiscard (#1098) 2021-12-01 08:40:09 +08:00
An Tao
d6b09c9e1b
Fix an error when binding a function pointer to SqlBinder (#1097) 2021-12-01 08:39:42 +08:00
An Tao
7d137362bd
Fix the error with multiple results when calling a procedure in mysql (#1091) 2021-11-28 16:26:23 +08:00
NitroMelon
ec8146774a
Add overloads for SqlBinder::operator<< with non-const ref parameter. (#1089) 2021-11-25 19:18:30 +08:00
An Tao
895552dcae
Export some symbols for Windows (#1088) 2021-11-24 23:59:00 +08:00
L0ric0
953000e3fb
Fix compiler warnings (#1081)
* Fix narrowing conversion warning.

The `static_cast` does not change the behavior of the programm only explictly stating that the behavior is intended.
This change is needed as some compiler settings will treat this warning as an error.

* Do not redeclare `result` variable in insertFormattedString as it shadows variable in outer scope.

This fixes a compiler warning for shadowing variables declared in an outer scope. This change does not change the behaviour of the programm as the shadowd variable is not reused after the inner scope ends. Also the new version should represent the intention of the code better.
This change is needed as some compiler settings will treat this warning as an error.
2021-11-21 09:14:57 +08:00
Martin Chang
6b0e38fc8f
Experimental HaikuOS Support (#1002) 2021-08-28 11:47:24 +08:00
Philip Kovacs
a70a2844b1
Fix compiler warnings (#886)
Co-authored-by: an-tao <antao2002@gmail.com>
Co-authored-by: Martin Chang <marty1885@users.noreply.github.com>
2021-06-09 19:14:15 +08:00