* Move the code for sqlpp::sqlite3::detail::prepared_statement_handle_t to include/sqlpp11/sqlite3/detail/prepared_statement_handle.h
* Whitespace
* Move the code for sqlpp::sqlite3::detail::connection_handle to include/sqlpp11/sqlite3/detail/connection_handle.h
* Rename sqlpp::sqlite3::serializer_t -> sqlpp::sqlite3::context_t
* Add const qualifiers to sqlpp::mysql::context_t::escape() and its parameter.
* Change method argument types "const std::string" -> "const std::string&"
* Remove a superfluous function that forwards the call to sqlite3_close().
* Move initialization of sqlpp::sqlite3::detail::prepared_statement_handle_t data members from the constructor into the member initialization list.
* Rename method parameter from CamelCase to snake_case.
* Move the method definitions for sqlpp::postgresql::detail::statement_handle_t inside the class.
* Move the method definitions for sqlpp::postgresql::detail::prepared_statement_handle_t inside the class.
* Move the method definitions for sqlpp::postgresql::prepared_statement_t inside the class.
* Move the method definitions for sqlpp::postgresql::::Result inside the class.
* Remove superfluous inline specifier from the in-class method definitions of sqlpp::postgresql::Result.
* Remove unused method declaration sqlpp::postgresql::Result::hasError()
* Move the method definitions for sqlpp::postgresql::bind_result_t inside the class.
* Move the method definitions for sqlpp::postgresql::connection_base inside the class.
* Add a comment explaining why sqlpp::postgresql::context_t::escape() is defined out-of-class.
* Remove incorrect comment about forward declaration
* Remove a superfluous function that forwards the call to PQFinish().
* Replace "std::string" parameters with "const std::string&".
* Remove superfluous detail:: namespace qualification.
* Rename class/struct types, variables and functions from CamelCase to snake_case.
* Move the code for sqlpp::mysql::detail::connection_handle_t to include/sqlpp11/mysql/detail/connection_handle.h
* Move the code for sqlpp::mysql::detail::prepared_statement_handle_t to include/sqlpp11/mysql/detail/prepared_statement_handle.h
* Move the code for sqlpp::mysql::detail::result_handle to include/sqlpp11/mysql/detail/result_handle.h
* Rename sqlpp::mysql::detail::connection_handle_t -> sqlpp::mysql::detail::connection_handle
* Rename sqlpp::mysql::serializer_t -> sqlpp::mysql::context_t
* Add const qualifiers to sqlpp::mysql::context_t::escape() and its parameter.
* Rename class/struct types, variables and functions from CamelCase to snake_case.
* Remove a superfluous function that forwards the call to mysql_close().
* 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.
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.
- 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>
* 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.
* 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
Leak: The sqlite3 connection handle destructor was
accidentally turned into a default constructor during the
migration of repositories.
Replaced the sqlite3 raw pointer with a unique_ptr to prevent
this kind of accident.
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.
Changed sqlite3 usage tests to be linked into one executable.
This provokes multiple definition errors for non-inlined free
functions.
Also ran clang-format on the changed headers.
The compiler actually does a much better job at telling you if two
result columns have the same name as soon as you are trying to use
them.
In contrast to the static_assert, the compiler will even say which
name is ambiguous.
This was a special feature for a project I was working on long ago.
It provided implicit behavior for trivial value (0 or "") which were
supposed to be interpreted as NULL.
They led to `operator==` potentially being serialized as 'IS NULL'.
It makes more sense to introduce explicit helpers, e.g.
- equal_or_is_null(col, optional)
- not_equal_or_is_not_null(col, optional)
* Minimal over() implementation for aggregate functions
* auto_alias support for over()
* add missing typename
* Test .over() serialization
* Add missing return to test
* Fix testing over auto alias
Co-authored-by: Ben Maxwell <42680490+MaciumDue@users.noreply.github.com>