m***@gmail.com
2018-11-07 10:30:44 UTC
Hi!
I work in Postgres. Let's say we have tables t1 with "int8" column
"longVal" and table t2 with "int4" column "intVal". In Postges
t1.longVal = t2.intVal
is possigle, but JOOQ requires casting
t1.LONGVAL.eq(t2.INTVAL.cast(SQLDataType.BIGINT))
otherwise it won't even compile.
t1.LONGVAL is TableField<t1Record, Long>
t2.INTVAL is TableField<t2Record, Integer>
Why JOOQ requires casting if SQL doesn't?
Is it possible to write this comparison without casting, so there would be
no CAST in generated SQL querry?
I work in Postgres. Let's say we have tables t1 with "int8" column
"longVal" and table t2 with "int4" column "intVal". In Postges
t1.longVal = t2.intVal
is possigle, but JOOQ requires casting
t1.LONGVAL.eq(t2.INTVAL.cast(SQLDataType.BIGINT))
otherwise it won't even compile.
t1.LONGVAL is TableField<t1Record, Long>
t2.INTVAL is TableField<t2Record, Integer>
Why JOOQ requires casting if SQL doesn't?
Is it possible to write this comparison without casting, so there would be
no CAST in generated SQL querry?
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.