0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-12-27 08:31:06 +08:00

83 Commits

Author SHA1 Message Date
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
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
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
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
3c344c0546 Add support for "rationale" column type from pg_rational extension 2022-06-08 06:35:39 +02:00
Carlitxxx86
0c3c09dc2f Added instructions to ignore OR REPLACE clause 2022-04-25 06:37:40 +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
Yuanhao Jia
9fc07ef757 Fix namespace closing comment order in ddl2cpp script 2022-03-04 06:55:20 +01:00
linrongbin
1b10d36030 add mediumtext data type for mysql in ddl2cpp script 2022-02-11 07:47:04 +01:00
Roland Bock
5b3abca4b1 Partial rewrite of ddl2cpp
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.
2022-02-06 17:33:22 +01:00
vrqq
d8a76fa282
Fix part of issue #418 (#419)
The first problem in https://github.com/rbock/sqlpp11/issues/418

Match table name ```"public"."dk"``` to ```_literal[] = public.dk``` and ```struct PublicDK```
2022-01-31 07:00:58 +01:00
Zach Toogood
62f987ef44
Various additions to ddl2cpp for MySQL (#416) 2022-01-16 17:22:17 +01:00
Roland Bock
310a6245fa Added blob support for postgresql
Tests look reasonably fine.
2021-11-14 13:14:34 +01:00
Sylvain Joubert
b4acfa27e9 ddl2cpp: Fix compatibility with pyparsing 3+
Fix #388
2021-11-10 19:29:40 +01:00
Brett-Michael Green
cab4bc79ed Add some MYSQL types to the ddl2cpp script 2020-06-17 07:26:26 +02:00
Sylvain Joubert
183a05156a
Add begin and end keywords in the reserved names to be escaped (#310) 2020-02-06 10:58:53 +01:00
rbock
268c176d8a Adjust sample.sql and ddl2cpp to match Sample.h 2019-10-05 10:20:15 +02:00
rbock
e9f6f07677 Merge branch 'release/0.58' 2019-04-18 09:15:31 +02:00
rbock
80e25a5e52 Add AUTOINCREMENT support in ddl2cpp for sqlite3 2019-03-03 09:11:33 +01:00
rbock
052dbe10b2 Re-added accidentally removed real type to ddl2cpp 2018-12-24 17:44:17 +01:00
Aaron Bishop
4c53ffcb3f Add option to ddl2cpp to enable splitting tables into individual header files 2018-09-25 08:43:10 -04:00
L3nn0x
c7e73a0516 Added mediumint unsigned to dll2cpp 2018-07-15 19:35:58 +01:00
rbock
5213022a80 Fix merge error. 2018-06-01 10:30:18 +02:00
rbock
a643095958 Merge branch 'release/0.55' 2018-06-01 09:53:06 +02:00
Andreas C. Osowski
18e1c180fe
ddl2cpp: support CHECK constraint 2018-04-18 19:02:06 +02:00
Sergei Nikulov
9a5df4cca2 sqlite3: added real data type 2018-04-09 22:23:00 +03:00
Sylvain Joubert
805c6476f4 Add more PostgreSQL type mapping in ddl2cpp 2018-02-26 14:24:27 +01:00
Arne Luenser
5e8d81adbf Allow digits 0-9 in include guards 2018-02-13 10:29:28 +01:00
Roland Bock
a2b22b9bac
Merge pull request #215 from sjoubert/ddl2cpp_identity_naming
Add the possibility to keep the table and column names as in the DDL
2018-02-08 19:46:41 +01:00
Sylvain Joubert
d2d9a1693c Add the possibility to keep the table and column names as in the DDL 2018-02-08 13:23:14 +01:00
Sylvain Joubert
20ab921a5a Add mapping of the 'clob' type to the existing 'text' type 2018-02-08 13:22:47 +01:00
rbock
109b0af880 Add quoting for table and column names.
More reserved words have to be added to ddl2cpp
2017-11-26 19:19:26 +01:00
rbock
e90a988a69 Remove some commented lines 2017-11-07 13:00:33 +01:00
rbock
8d92de3fe9 Remove debug printout 2017-11-07 08:57:31 +01:00
rbock
fd939975ee Scan for unsigned integral columns 2017-11-06 21:37:10 +01:00
Serge Robyns
02cf37e3e3 Fixed mising namespace comment on tablenames (to silence clang-tidy). 2017-08-09 17:50:26 +02:00
rbock
cd778444d6 Merge branch 'release/0.49' 2017-06-04 15:58:40 +02:00
Andreas Sommer
e77639033a Support implicitly treating id column as auto-incrementing (e.g. for SQLite) 2017-06-03 00:41:44 +02:00
L3nn0x
55d0e2ac0d Added mediumint to ddl2cpp 2017-04-25 22:23:59 +02:00
rbock
f88efada67 Allow for "IF NOT EXISTS" in createTable in ddl 2017-03-05 19:50:55 +01:00
rbock
e53bbcc9bd Support for PostgreSQL serial 2017-03-05 19:13:26 +01:00
mlimber
3baa513a07 Allow nested namespaces on the command line
Allow the generator to handle nested namespaces like:
    ddl2cpp table.ddl table My::Nested::Namespaces
2017-01-07 00:16:50 -05:00
strangeqargo
3d2dae9bb1 fixed 2016-06-09 19:19:37 +03:00
strangeqargo
bcd7341476 fix formatting 2016-06-09 19:18:15 +03:00
“digitalist.ru”
ec6c36d541 fix typo 2016-05-15 01:05:08 +03:00