It works perfectly with the template :)
thx.
On Thursday, April 23, 2015 at 8:05:27 AM UTC+2, Lukas Eder wrote:
>
> Ah, yes of course - the CustomTable option is another one that'll help you
> abstract over this. Or, if this is just for a single usage, you can also
> keep it simple and use plain SQL like so:
>
> public static <R extends Record> Table<R> link(Table<R> table, String
> linkName) {
> DSL.table("{0}@{1}", table, DSL.name(linkName));
> }
>
>
> (I haven't tried this with jOOQ 3.2, but I'm sure it'll work in a similar
> way)
>
> 2015-04-22 18:58 GMT+02:00 Stanislas Nanchen <[email protected]
> <javascript:>>:
>
>> Hi Lukas!
>>
>> Thank you for the quick answer. and for the RenderNameStyle.AS_IS hint :
>> as the schema is the same, I can simply use a CustomTable ;)
>> Cheers!
>>
>> Stan.
>>
>> On Wednesday, April 22, 2015 at 3:34:16 PM UTC+2, Lukas Eder wrote:
>>>
>>> Hi Stan,
>>>
>>> I have thought about that in the past, but interestingly, there isn't
>>> any feature request on the road map yet! I've added one:
>>> https://github.com/jOOQ/jOOQ/issues/4222
>>>
>>> In the mean time, you can easily work around this limitation:
>>>
>>> 1. Run the code generator directly on the linked database
>>> 2. Configure the code generator's schema mapping to generate the DB link
>>> name, i.e. TABLE_NAME -> TABLE_NAME@DBLINK (
>>> http://www.jooq.org/doc/latest/manual/code-generation/schema-mapping/)
>>> 3. Probably use Settings and RenderNameStyle.AS_IS to remove quotes in
>>> order to have the correct syntax (i.e. OWNER.TABLE_NAME@DBLINK instead of
>>> "OWNER"."TABLE_NAME@DBLINK")
>>>
>>> Alternative workaround:
>>>
>>> 1. Run the code generator directly on the linked database
>>> 2. Create synonyms for every linked table, containing the DB link
>>>
>>> I think that both of the above workarounds will work also with jOOQ 3.2
>>>
>>> Hope this helps,
>>> Lukas
>>>
>>>
>>>
>>> 2015-04-22 15:19 GMT+02:00 Stanislas Nanchen <[email protected]>:
>>>
>>>> Hi everyone!
>>>>
>>>> I'm using jooq 3.2 with Oracle 11g and would like to select over a
>>>> database link. Something like:
>>>>
>>>> select *
>>>> from T@db_link
>>>> where ...
>>>>
>>>> How can one do that in Jooq?
>>>> Thank you for your help!
>>>>
>>>> Stan.
>>>>
>>>> --
>>>> 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].
>>>> 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 [email protected] <javascript:>.
>> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.