Commit Graph

330 Commits

Author SHA1 Message Date
Alexey Gerasimchuck
e79d5170b4
Implemented database reconnection loop (#2003) 2024-04-24 10:09:05 +08:00
Ken Matsui
3d469112ca
Enable readability/multiline_string for cpplint (#1940) 2024-01-31 20:17:59 +08:00
Ken Matsui
f63480674f
Enable build/storage_class for cpplint (#1937) 2024-01-31 19:21:46 +08:00
Ken Matsui
56a53165b6
Add newline at EOF (#1932) 2024-01-31 10:43:30 +08:00
antores
8e4ffa71e2
Fix building with MSYS2 (#1902)
Co-authored-by: antores <antores@users.noreply.github.com>
2024-01-15 10:14:05 +08:00
antores
5ecbd1f184
Fix htonll/ntohll redefinition (#1899)
Co-authored-by: antores <antores@users.noreply.github.com>
2024-01-09 09:47:07 +08:00
An Tao
2a0da80d5f
Avoid a race condition in database listener tests (#1890) 2023-12-28 19:23:42 +08:00
An Tao
4eec56c49f
Remove the default ctor of the Row class in ORM (#1885) 2023-12-17 08:28:35 +08:00
Tanglong3bf
ba9e9731d2
Fix ORM: The original way did not handle exceptions correctly. (#1872) 2023-12-16 14:07:27 +08:00
Christian Clauss
e76bf08eb2
GitHub Action to find typos in the codebase using codespell (#1876)
GitHub Action to find typos in the codebase using codespell
https://github.com/codespell-project/codespell
2023-12-09 13:48:24 +08:00
Greisberger Christophe
8026790e1a
Feature: Integrate spdlog as logging backend (#1771) 2023-12-04 23:42:35 +08:00
Minha, Jeong
27f1a3d812
Fix: typo on Mapper method (#1867) 2023-11-28 17:52:25 +08:00
Tanglong3bf
6f6a03b14b
Provide some functions for incrementing the value of given columns. (#1831) 2023-11-25 02:23:37 +08:00
An Tao
1ec3c96cbb
Use the constexpr if instead of std::enable_if (#1843) 2023-11-15 11:22:14 +08:00
An Tao
ab76e80089
Make & and * directly adjacent to variable names (#1810) 2023-10-12 11:27:25 +08:00
OrbitZore
fd7af8110f
Add optional Criteria && || operator support (#1797) 2023-09-26 13:58:02 +08:00
Ken Matsui
5d0c70278e
Delete apply.h (#1763) 2023-08-29 13:55:04 +08:00
frank10gm
816684e15d
Replace sprintf with snprintf (#1758)
Co-authored-by: francesco.laplaca <francesco.laplaca@enhancers.it>
Co-authored-by: Ken Matsui <26405363+ken-matsui@users.noreply.github.com>
2023-08-28 17:18:12 +08:00
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