0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-12-26 07:53:21 +08:00

89 Commits

Author SHA1 Message Date
MeanSquaredError
f6cb4d311a ddl2cpp: Add tests for the column isPrimaryKey property. 2024-06-12 20:22:06 +02:00
MeanSquaredError
ffd6618e58 Treat "PRIMARY KEY" columns as not nullable. 2024-06-12 20:22:06 +02:00
MeanSquaredError
43fa5c445c ddl2cpp: Require word breaks when parsing SQL keywords. 2024-06-12 07:25:19 +02:00
MeanSquaredError
8797dfd79e Recognize serial2, serial4 and serial8 types when parsing SQL definitions in the ddl2cpp script. 2024-06-11 06:36:13 +02:00
MeanSquaredError
a1baba0ab7 Fix warnings in Python regexes by adding missing backslashes. 2023-11-17 08:52:00 +00: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
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