ok, thanks

some utils to use then, but not a way to change getting field everywhere

thanks again!

On Monday, September 20, 2021 at 5:58:04 PM UTC+2 [email protected] wrote:

> static Field<?> myField(Table<?> table, String name) {
>     Field<?> result = table.field(name);
>     if (result == null)
>         result = table.field(name.toUpperCase());
>     if (result == null)
>         result = table.field(name.toLowerCase());
>     return result;
> }
>
> On Mon, Sep 20, 2021 at 5:31 PM Joe <[email protected]> wrote:
>
>> Thanks a lot Lukas
>>
>> i've a hard time seeing how to write my "own auxiliary column lookup API" 
>> apart from forking the source code and changing the Fields class, do i miss 
>> something?
>>
>> thanks again
>>
>>
>> On Monday, September 20, 2021 at 2:58:13 PM UTC+2 [email protected] 
>> wrote:
>>
>>> 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/2199d5a3-46cf-4697-b02b-3aedec7561f4n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jooq-user/2199d5a3-46cf-4697-b02b-3aedec7561f4n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/1f8a67b1-de95-425d-83cd-df09ce01a402n%40googlegroups.com.

Reply via email to