0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 12:51:13 +08:00
Commit Graph

31 Commits

Author SHA1 Message Date
Roland Bock
e17e9aebde serialize -> to_sql_string 2024-08-10 15:35:58 +02:00
Roland Bock
4a9f9c384c Remove option to compile tests with different standard
The library is header only. It makes no sense to distinuish
between the standard the library is compiled with and the
standard the tests are compiled with. The library does not
get compiled on its own.
2024-08-03 10:29:20 +02:00
Roland Bock
68a3265fdc More moves 2024-07-30 07:32:30 +02:00
Roland Bock
79da114c00 Move stuff out of compat namespace
It is too much cognitive overhead
2024-07-29 20:49:45 +02:00
Roland Bock
3f73115356 Move stuff into core 2024-07-29 20:38:10 +02:00
Roland Bock
91af6aa385 Still more moves 2024-07-29 07:08:37 +02:00
Roland Bock
715839e18f More moves 2024-07-28 21:04:26 +02:00
Roland Bock
44ce033845 Move more stuff 2024-07-28 20:56:27 +02:00
Roland Bock
b869cbe5b2 Synchronize sql and generated code for connector tests 2024-06-22 16:27:10 +02:00
Roland Bock
0eac55c377 Move optional, string_view, and span into sqlpp::compat 2024-06-12 21:31:18 +02:00
Roland Bock
8d0f3b3739 Clean up superfluous classes and functions
And remove some remaining dynamic parts which were overlooked before.
2024-06-12 20:33:35 +02:00
Roland Bock
bda77c620b Introduce optional, string_view, and span
sqlpp::optional is an alias for std::optional for C++17 and beyond.
Otherwise, it is a simple and incomplete backport.
For older versions of C++, the library offers simple back

Similar for string_view and span.
2024-06-12 20:29:10 +02:00
MeanSquaredError
9b49afa306
Add is_transaction_active() to all connectors (#550)
* Document the connector API method is_transaction_active()
* Move mysql::connection_base::is_transaction_active() to the other transaction-handling methods.
* Add more tests for mysql::connection::is_transaction_active()
* Add postgresql::connection_base::is_transaction_active()
* Add tests for postgresql::connection_base::is_transaction_active()
* Change the type of the SQLite3 transaction status from transaction_status_type to a boolean flag.
* Add sqlite3::connection_base::is_transaction_active()
* Add tests for sqlite3::connection_base::is_transaction_active()
* When closing a transaction do it in the following order: report (if any), execute SQL command, set transaction active flag to false.
2024-01-05 08:59:42 +01:00
Roland Bock
451e337979 Introduce postgresql::remove_from with optional returning clause (#538) 2023-11-02 07:02:07 +01:00
MeanSquaredError
623b5154d0
Add connection methods is_connected() and ping_server() (#528)
* Replace connection handle method check_connection() with is_connected() and ping_server()

* When a connections is fetched from a pool perform a validity check which can be one of none, passive or ping.

* Add the methods is_connected() and ping_server() to the connection template class.

* Remove unused #include and add mising #include.

* Add tests for the connection methods is_connected() and ping_server().
2023-09-20 06:38:16 +02:00
MeanSquaredError
a085d730c9
Replace include guards with "#pragma once" in all header files and in the database model generator scripts. (#506) 2023-07-25 07:00:05 +02:00
MeanSquaredError
4295c29e9a
Fix serialization of PostgreSQL time data types (#504)
* Use a non-UTC timezone when testing the PostgreSQL timezone support.
* Fix serialization of time of day values for PostgreSQL
* Fix serialization of PostgreSQL values for "timestamp with time zone" and "time with time zone" fields.
2023-07-24 06:40:18 +02:00
MeanSquaredError
dff8c23b22
Connection pools (#499)
Add support for connection pooling

* Add support for connection pooling to the core code.
* Add support for PostgreSQL connection pooling with tests.
* Add support for SQLite3 connection pooling with tests.
* Add support for MySQL connection pooling with tests.
2023-07-17 06:14:23 +02:00
Carel
eac9a6e5e3
Const connection config (#494)
- The postgres connection does not change the connection_config thus passing it as const.
- Implies 'thread safety' when using the same config for multiple connections

Co-authored-by: Carel Combrink <carel.combrink@vastech.co.za>
2023-06-20 06:28:22 +02:00
MeanSquaredError
a72b172a52
Treat PostgreSQL time values as being in UTC time zone (#487)
* When inserting values into "timestamp with time zone" fields treat the value as being in the UTC time zone.

* Simplify parsing of PostgreSQL date/time responses by using regular expressions. Always convert response times with time zone to UTC.

* Add tests which check if timestamp and date fields are treated as having a UTC time zone.

* Clarify the test comments.
2023-06-16 06:57:19 +02:00
Bernd Lörwald
9412851408
#471 serializers: ensure float precision (#472)
* value: add missing includes
* mysql, sqlite3: use explicitly *out* stringstreams for serialization
* postgresql: fix: use max_digits10 instead of digits10
* detail: add float_safe_ostringstream, ensuring floats are serialized with enough precision
* mysql, postgresql, sqlite3, tests: fix: set float-precision for all streams
* run clang-format on changed files
* inline remove_cvref.h
* replace unspecific "wrapper" with concrete type name
* tests: split connector specific tests out of serialize/Float
2023-02-18 08:10:50 +01:00
hwhsu1231
2aa9797117 style: Align CMake files with 4 spaces indent 2022-11-26 08:32:46 +01:00
Roland Bock
256429730a Fix CMake warnings (CMP0115) 2022-06-06 10:14:01 +02:00
Roland Bock
f5be4095ae Allow parameter in having clause, see #443
Disallow mixing aggregate and non-aggregate columns in select, too.
2022-05-22 15:05:58 +02:00
Mike Neilson
6477f09125 Added additional exception class.
Handles the case of user defined exception in pl/pgsql to it can be reported
back to the calling application.
2022-03-11 07:47:22 +01:00
Jürgen Hunold
f7f2060c44 Add support for TIME columns in postgresql 2022-02-08 18:24:15 +01:00
Jürgen Hunold
b2166c636b Untabify test list 2022-02-08 18:24:15 +01:00
Roland Bock
b8aed2af55 Address conversion warnings and fix UAF bug in test 2022-01-14 07:39:11 +01:00
Leon De Andrade
d17bce9644
Add Connector CMake Logic (#394)
Add Connector Cmake logic

* Also install date when used with fetch content
* Install everything always
* Update documentation
* Add option to control dependency searching
* Adjust travis
2021-12-02 07:45:38 +01:00
Roland Bock
310a6245fa Added blob support for postgresql
Tests look reasonably fine.
2021-11-14 13:14:34 +01:00
Roland Bock
4c942600bb Started to migrate postgresql connector into sqlpp11 repo.
Removed timezone handling in the process (needs to be documented).
Note: on_conflict does not check for constraints (needs to be documented).
Note: some of the constraints tests seem to be aiming for a different static_assert.
2021-11-14 08:11:53 +01:00