Re: RenderQuotedNames.ALWAYS not rendering quotes for SQLite

2024-03-21 Thread Marcel Overdijk
Yes I know it’s a challenge to try to create “ANSI SQL” files.Maybe a bit of background I have to share I have a project which contains semi-static data which is updated ~2 times a month.The data is provided to users in various formats like csv, json and smile.Another variant is a SQLite database

Re: RenderQuotedNames.ALWAYS not rendering quotes for SQLite

2024-03-21 Thread Lukas Eder
Thanks for your message. The logic to prevent quoting in SQLite is very old. I don't recall the exact reason, but I believe that SQLite's parser had a lot of trouble with quoted identifiers in some contexts - so the solution was to simply avoid quoting, except for identifiers that conflict with

Re: RenderQuotedNames.ALWAYS not rendering quotes for SQLite

2024-03-21 Thread Marcel Overdijk
Note I also tried with SQLDialect.POSTGRES and then I get the double quotes. But then date values are rendered like: INSERT INTO "TABLE_A" ("DATE") VALUES ( DATE '2024-03-21') which I think is not mandatory for PostgreSQL, but is not supported e.g. with SQLite... On Thursday, March 21,

RenderQuotedNames.ALWAYS not rendering quotes for SQLite

2024-03-21 Thread Marcel Overdijk
// Create context. Settings settings = new Settings() .withRenderQuotedNames(RenderQuotedNames.ALWAYS); DSLContext ctx = DSL.using(SQLDialect.SQLITE, settings); // Insert statement. Continent continent = new Continent();