Hi Joe,

On Mon, Sep 20, 2021 at 2:17 PM Joe <[email protected]> wrote:

> Hello
>
> Thanks a lot for jOOQ :)
>
> When doing queries like this:
> ```dslContext
> .select(DSL.count(table.field("SOME_FIELD")))
> .from(table) ```
>
> we would like "SOME_FIELD" to be taken in account in a case insensitive
> way.
>
> For example we would like to be able to write both:
> ``` dslContext
> .select(DSL.count(table.field("SOME_FIELD")))
> .from(table) ```
> and
> ``` dslContext
> .select(DSL.count(table.field("some_field")))
> .from(table) ```
>
> Is it possible somehow?
>

You can write your own auxiliary column lookup API for the time being until
this is ever supported:
https://github.com/jOOQ/jOOQ/issues/2656


> At worst is there a way to force a case other than the one in the DB, for
> example having some_field in DB but using SOME_FIELD when querying?
>

You could generate jOOQ code based on an alternative schema using upper
case identifiers and then make sure jOOQ won't quote any identifiers in its
generated SQL. But that won't make jOOQ identifiers case insensitive, it
will just use upper case, case sensitive identifiers instead of lower case
ones.

I hope this helps,
Lukas

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/CAB4ELO6uGFE1owfU3Yurv6bxfAgQuTXw9K3B%2B3k4kc5iKfGxwA%40mail.gmail.com.

Reply via email to