0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-15 20:31:16 +08:00
Commit Graph

1439 Commits

Author SHA1 Message Date
MeanSquaredError
3c598cd0b2
Fix building with sqlcipher (#508)
* Move cmake/Find*.cmake -> cmake/modules/Find*.cmake
* Add cmake/modules/FindSQLCipher.cmake from sqlpp17
2023-07-30 10:12:59 +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
Orange Cheers
b548cdc72d
Fix typo. (#505) 2023-07-25 06:51:33 +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
4a1ed2c02e
Fix serialization of time points for MySQL. (#503) 2023-07-23 10:40:27 +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
Roland Bock
a50d719364 Fix brace initialization, #498 2023-06-30 06:39:46 +02:00
MeanSquaredError
26280d2678
gcc warnings (#496)
* Enable std::move() by using std::string instead of const std::string&

* Fix dangling references.
2023-06-28 06:32:39 +02:00
Carel
babd420ecb
ddl2cpp command line argument for custom types (#491)
* ddl2cpp command line argument for custom types

- Updated the ddl2cpp script to allow custom/extended types through external csv file
- Had to re-order the script to allow the command line to be parsed before setting up the parser
- Updated README

* Test for the command line argument

- Script test only for now

* Test the custom type argument

- Firs a negative test
- Last a positive test and compile test against the generated output

* Expand the test

- Ensure built in types still work
- Check capitilisation
- Ensure more than one custom works
- Check type with spaces

---------

Co-authored-by: Carel Combrink <carel.combrink@vastech.co.za>
2023-06-22 07:06:00 +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
Matthijs Möhlmann
38aba217d4 std::string_view should also be assignable in prepared statements 2023-04-03 06:16:57 +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
Bernd Lörwald
dfa297f069 ci: enable ctest output on failure 2023-02-11 09:04:45 +01:00
Roland Bock
64d16bfee0 Cleanup parens for ANY and SOME 2023-02-05 09:31:30 +01:00
Roland Bock
0731a8597d Cleanup parens for EXISTS 2023-02-04 10:21:54 +01:00
Roland Bock
2d3967a0b3 Cleanup braces for IS_NULL and IS NOT NULL 2023-02-04 10:12:55 +01:00
Roland Bock
1c4f1f61c8 Allow TRIM to be used with sub selects 2023-02-04 09:05:04 +01:00
Roland Bock
3fba3e721e Add UPPER and LOWER
This is replacing and extending #456.
2023-02-04 08:57:17 +01:00
Bernd Lörwald
7379e0001f ddl2cpp: allow inline column constraints ("PRIMARY KEY") but don't break auto-id 2023-01-31 06:32:00 +01:00
Roland Bock
82758a2046 Add missing braces to aggregatedfunctions with sub select #469
Also allow MIN and MAX to be used with DISTINCT.
2023-01-29 14:39:07 +01:00
Roland Bock
673b07361b Add missing braces to SUM with sub select #469 2023-01-29 12:57:02 +01:00
Roland Bock
743d39c0c6 Rename requires_braces to requires_parens
This fixes a typical German mistake :-)
2023-01-29 11:55:58 +01:00
Gonzalo Fernandez Yaique
5b0eee1c4c Extend match expression for table names in ddl2cpp
Using pg_dump, if the table is named after a special keyword (e.g. character),
is dumped as public."character".
This commit extends the names expression to match those cases.
2023-01-19 06:21:25 +01:00
Leonhard Kipp
a77d8009bb Add mysql DIV operator 2023-01-14 08:19:24 +01:00
Yagna Srinath Reddy Battula
bea910e122 Fix for namspace repetetion which should have been individual namespaces 2022-12-31 09:45:05 +01:00
Moritz Wirger
42bd3cc79b Fix include for iso646 missing for MSVC 2022-12-10 09:37:56 +01:00
Moritz Wirger
c550694b44 Fix mariadb include dir not found 2022-12-10 09:37:56 +01:00
hwhsu1231
2aa9797117 style: Align CMake files with 4 spaces indent 2022-11-26 08:32:46 +01:00
Leon De Andrade
648183fd64 Proper MariaDB and MySQl findPackage support 2022-08-21 09:54:58 +02:00
Roland Bock
4be8b9f654 Add example for #448 2022-06-20 06:58:51 +02:00
Leonhard Kipp
6ae27a922e Add ddlBracedArguments to expressions 2022-06-14 06:46:24 +02:00
Leonhard Kipp
c84f34d6f9 Add failing testcase 2022-06-14 06:46:24 +02:00
Jürgen Hunold
892e680a73 Add parser self-test to auto test suite 2022-06-08 06:35:39 +02:00
Jürgen Hunold
3c344c0546 Add support for "rationale" column type from pg_rational extension 2022-06-08 06:35:39 +02:00
Roland Bock
57077cd32b Add standalone insert_columns function (#76)
This allows for multi-row INSERT OR IGNORE
2022-06-06 10:15:28 +02: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
Carlitxxx86
1e7f4b98c7 Added OR REPLACE clause 2022-04-25 06:37:40 +02:00
Carlitxxx86
0c3c09dc2f Added instructions to ignore OR REPLACE clause 2022-04-25 06:37:40 +02:00
Carlitxxx86
92fa9d365d Added sample table definitions for System-Versioning
Both with implicit and explicit column definition.
2022-04-22 06:21:24 +02:00
Carlitxxx86
31ef4f2e54 Added MariaDB keywords GENERATED and PERIOD
Both keywords are used for System Versioned tables.
GENERATED marks a column as auto generated.
PERIOD is ignored fro the script.
2022-04-22 06:21:24 +02:00
Jürgen Hunold
9bfee74a99 Fix parsing of float fields with scale digits 2022-04-18 09:54:05 +02:00
Roland Bock
b50cc454b6 Fix constraints handling in ddl2cpp (#437)
Constraints got interpreted as (unknown) data types.
This change should fix this most cases (simple test case added).
2022-04-09 21:47:21 +02:00
Roland Bock
1d5caca523 Allow value_or_null to be assigned to parameters (#435) 2022-04-02 08:27:38 +02:00
Roland Bock
052c8a9e3c
Fix typo. 2022-03-13 11:22:10 +01:00
Mike Neilson
03671ea75e Fixed ddl2cpp test setup and checks.
cmake file contained extra parameter that appears to no longer be used.
bad_has_parse_error test output check was not longer valid.
2022-03-11 07:47:22 +01: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
Roland Bock
b965b2a1df Fix warnings (#422) 2022-03-04 07:49:05 +01:00
Yuanhao Jia
9fc07ef757 Fix namespace closing comment order in ddl2cpp script 2022-03-04 06:55:20 +01:00