* 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>
- 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
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.
Initially setting out to fix#418, this change
- accepts more SQL expressions
- uses slightly more idiomatic pyparsing, I believe
- uses black formatter
- comes with some unit tests for the parser
- simplifies options
Tested with all SQL files in the repo.