Re: How to handle names etc. for Common Table Expressions?

2020-02-07 Thread Thorsten Schöning
Guten Tag Lukas Eder, am Donnerstag, 6. Februar 2020 um 14:43 schrieben Sie: > Do note that you can also work with string-based SQL and parse that using > jOOQ's DSLContext::parser API: > https://www.jooq.org/doc/latest/manual/sql-building/sql-parser/ If I understood things correctly, that doesn'

Re: How to handle names etc. for Common Table Expressions?

2020-02-07 Thread Lukas Eder
On Fri, Feb 7, 2020 at 11:50 AM Thorsten Schöning wrote: > So in my opinion things break down to if anything from the code > generator is used or not. If so, one wouldn't want to deal with plain > strings anymore at any place and express everything using names, > fields etc. from jOOQ instead I g

Re: How to handle names etc. for Common Table Expressions?

2020-02-07 Thread Thorsten Schöning
Guten Tag Lukas Eder, am Freitag, 7. Februar 2020 um 13:34 schrieben Sie: > Sure. But since this is a public list, with a few folks lurking, I always > like to open up discussions to broader topics[...] And that's exactly how I understood your mail and why I brought my opinion into this discussio

Re: How to handle names etc. for Common Table Expressions?

2020-02-07 Thread Lukas Eder
On Fri, Feb 7, 2020 at 3:23 PM Thorsten Schöning wrote: > > No, but it makes working with them easier, as they now behave like > ordinary > > tables / views. > > I still don't get it: There's no place where I can interchange CTEs > and my custom tables, only reuse individual components. In your

Re: How to handle names etc. for Common Table Expressions?

2020-02-07 Thread Thorsten Schöning
Guten Tag Thorsten Schöning, am Freitag, 31. Januar 2020 um 19:06 schrieben Sie: > I tried following the approach jOOQ is doing by simply creating > classes with fields for each CTE and their columns.[...] One can get exactly what jOOQ does by using the code generator with a schema for a XMLDatab

globalTableReferences vs. globalCatalogReferences

2020-02-07 Thread Thorsten Schöning
Hi all, I'm playing around with the XMLDatabase-based code generator of jOOQ and wondered about the following behaviour. Using the following settings, three files get generated: > false > false > true > DefaultCatalog.java > DefaultSchema.java > Tables.java When I set "globalTableReferences" to

Re: globalTableReferences vs. globalCatalogReferences

2020-02-07 Thread Lukas Eder
The DefaultSchema is not the "globalSchemaReferences" you have in mind. It's your schema in the absence of a known, named schema. "globalSchemaReferences" is a list of references to schemas from your DefaultCatalog. "globalCatalogReferences" is currently not used, but might be used if we ever gene

Support environment variables in target directory of the code generator?

2020-02-07 Thread Thorsten Schöning
Hi all, configs for my code generator are placed in the following directory, of which the upper most level is an Eclipse-project: > de.am_soft.sm_mtg.backend\src\main\code_gen\de\am_soft\sm_mtg\backend\daos\db\jooq\live\code_gen.xml > de.am_soft.sm_mtg.backend\src\main\code_gen\de\am_soft\sm_mtg\

Re: Support environment variables in target directory of the code generator?

2020-02-07 Thread Lukas Eder
jOOQ 3.13 will have a configuration/basedir property for that: https://github.com/jOOQ/jOOQ/issues/9727 In the mean time, you could run the code generation with your XYZ directory as the JVM's working directory, I suspect. Thanks, Lukas On Fri, Feb 7, 2020 at 4:36 PM Thorsten Schöning wrote: >

Re: How to handle names etc. for Common Table Expressions?

2020-02-07 Thread Lukas Eder
On Fri, Feb 7, 2020 at 4:15 PM Thorsten Schöning wrote: > Guten Tag Thorsten Schöning, > am Freitag, 31. Januar 2020 um 19:06 schrieben Sie: > > > I tried following the approach jOOQ is doing by simply creating > > classes with fields for each CTE and their columns.[...] > > One can get exactly w

Re: How to handle names etc. for Common Table Expressions?

2020-02-07 Thread Thorsten Schöning
Guten Tag Lukas Eder, am Freitag, 7. Februar 2020 um 15:37 schrieben Sie: > Does this make sense? Absolutely, thanks! :-) You only have my old code, already changed it to what you suggested right now. BUT: Not with using a custom table, but my former approach with individual, unrelated fields onl

Re: How to handle names etc. for Common Table Expressions?

2020-02-07 Thread Lukas Eder
On Fri, Feb 7, 2020 at 4:50 PM Thorsten Schöning wrote: > Guten Tag Lukas Eder, > am Freitag, 7. Februar 2020 um 15:37 schrieben Sie: > > > Does this make sense? > > Absolutely, thanks! :-) You only have my old code, already changed it > to what you suggested right now. BUT: Not with using a cust

Re: Oracle 11g, multiple schemata: Error ORA-04043 when inserting data

2020-02-07 Thread Lukas Eder
For the record, and anyone finding this discussion later, jOOQ 3.13 will deploy a workaround for this ojdbc bug that can be activated / deactivated using a new flag Settings.applyWorkaroundFor7962. It is turned on by default, and affects only the ORACLE dialect. The problem happens when using:

Re: Support environment variables in target directory of the code generator?

2020-02-07 Thread Thorsten Schöning
Guten Tag Lukas Eder, am Freitag, 7. Februar 2020 um 16:40 schrieben Sie: > jOOQ 3.13 will have a configuration/basedir property for that: > https://github.com/jOOQ/jOOQ/issues/9727 > In the mean time, you could run the code generation with your XYZ directory > as the JVM's working directory, I s

Re: How to handle names etc. for Common Table Expressions?

2020-02-07 Thread Thorsten Schöning
Guten Tag Lukas Eder, am Freitag, 7. Februar 2020 um 17:04 schrieben Sie: > It's a lot of code. If you could TL;DR-summarize it with 6-7 lines, I'll be > happy to look at it. Couldn't reduce less, so if it's still too much, nevermind, I'll deal with it when executed and in case it breaks. I know