Related to generating the schema ddl I found there is the dsl.ddl(schema)
method of jooq.
So no need what I'm doing above ;-) and I changed my code to:
val jdbcUrl = "jdbc:sqlite:${outputFile.absolutePath}"
val jdbcProperties = Properties().apply {
setProperty("date_class", "text")
Yes I see. I will check out the RecordListener later then.
Btw, based on the generated classes, I wanted to see if I could generate
the DDL again from it ;-)
I came up with this:
// Table creation statement.
String create = ctx
.createTable(COUNTRY)
Hi Marcel,
On Mon, Mar 18, 2024 at 3:38 PM Marcel Overdijk
wrote:
> Hi Lukas, and thanks for your reply. This helps a lot.
>
> I used jOOQ In the past with code generation and I understand the benefits
> especially in terms of type information and type safety.
>
Sure, I knew you were aware of
Hi Ahmed,
Thank you for your message. Can you please show an example with details
about what you mean, specifically?
Best regards,
Lukas
On Mon, Mar 18, 2024 at 3:54 PM Ahmed Ghanmi
wrote:
> Hello Lukas,
>
> In our Oracle->PG migration, we are using JOOQ's ParsingConnection to
> translate
Hello Lukas,
In our Oracle->PG migration, we are using JOOQ's ParsingConnection to
translate between dialects.
Similar to https://github.com/jOOQ/jOOQ/issues/11757, we are facing issues
with Oracle's NULL and empty string equivalence.
The assumption is prelevant across the codebase as we have
Hi Lukas, and thanks for your reply. This helps a lot.
I used jOOQ In the past with code generation and I understand the benefits
especially in terms of type information and type safety.
In my case I'm not having a dynamic schema, but also not an active database
(I need to generate create table
You can specify the Settings.parseUnknownFunctions flag to tell jOOQ's
parser to ignore unknown scalar functions
On Mon, Mar 18, 2024 at 2:07 PM deepankar gupta <
deepankargupta1...@gmail.com> wrote:
> Hi Lukas,
>
> Does jooq parser support other than user-defined table valued functions
> like
Hi Lukas,
Does jooq parser support other than user-defined table valued functions
like functions which has return type as text or boolean?
Regards
Deepankar Gupta
On Monday, March 18, 2024 at 6:31:23 PM UTC+5:30 lukas...@gmail.com wrote:
> Hi Deepankar,
>
> Thank you for your message. Our
Hi Deepankar,
Thank you for your message. Our parser doesn't support user-defined table
valued functions yet, see:
https://github.com/jOOQ/jOOQ/issues/16200
But you can implement your own ParseListener to intercept the parsing of
Table expression and implement your own behaviour easily:
Hi Lukas,
We have a custom sql having table valued function in it which we are trying
to parse in jooq using parseSelect `
context.parser().parseSelect(customViewSQL);`.
When we have custom sql like this:
*SELECT * FROM Table_valued_function ('Al%');*
Error: It is not able recognize Table
Hi Marcel,
The SQL DSL can't do that for you, but you can turn any POJO into a Record
using Record.from() or DSLContext.newRecord(...). You can then use
.insertInto(table).set(record). There's a RecordUnmapper SPI that governs
how to "unmap" POJOs into records, with a DefaultRecordUnmapper
I'm currently using JDBI on a project with a DAO like:
@SqlBatch("insert_continent")
fun insertContinents(@BindBean continents: List)
Note this uses the @BindBean to automatically bind bean properties to sql
statements.
E.g. the insert_continent sql file contains:
INSERT INTO continent
( id
,
12 matches
Mail list logo