Hi Lukas, 

Yes, of course !

My main need was to add automatically some fields into the where clause 
(like multi tenant discriminator). 

This unit test help me a lot. It is more complex than the documentation 
example, but according to me, it is really more useful !

https://github.com/jOOQ/jOOQ/blob/af7a7c504c08fcd4ecb10c9ca4091a7cff930fb8/jOOQ-test/src/test/java/org/jooq/test/all/testcases/VisitListenerTests.java

Cheers,

Alex

Le mercredi 24 septembre 2014 16:59:18 UTC+2, Lukas Eder a écrit :
>
> Hi Alexandre,
>
> That's great! Would you mind showing us a little what you did? I think 
> this could be very valuable for future visitors of this mailing list thread.
>
> Cheers,
> Lukas
>
> 2014-09-24 16:29 GMT+02:00 <[email protected] <javascript:>>:
>
>> Hello Lukas,
>>
>> OK, thanks for your answer, I have finally solved my problem with Visitor 
>> SPI !
>>
>> Le mercredi 24 septembre 2014 15:49:55 UTC+2, Lukas Eder a écrit :
>>>
>>> Yes, ExecuteListener is good for hooking into the lifecycle of rendering 
>>> the SQL string, passing it to a JDBC PreparedStatement, passing the bind 
>>> values to the PreparedStatement, executing the statement and fetching the 
>>> results - whereas VisitListener allows for more detailed interaction with 
>>> the SQL rendering and bind variable extraction steps.
>>>
>>> 2014-09-24 10:57 GMT+02:00 <[email protected]>:
>>>
>>>> I have implemented an ExecuteListener but VisitListener permit to do 
>>>> SQL transformation, I will check this one !
>>>>
>>>> Le mercredi 24 septembre 2014 10:27:24 UTC+2, [email protected] a 
>>>> écrit :
>>>>
>>>>> Hello,
>>>>>
>>>>> I am evatuating your library for maybe use it in our new project.
>>>>> I have implemented my own listener and I want to check somes 
>>>>> conditions into the query (where clause). Or maybe add a condition to the 
>>>>> query.
>>>>>
>>>>> Is there a way to access to the private attribute conditions into the 
>>>>> query object ? It seems to be very interesting for doing this.
>>>>>
>>>>> The only solution I have found is to use ctx.query().getSQL(ParamType.
>>>>> INLINED) but it is more complicated to work with a String.
>>>>>
>>>>> Thanks for your help.
>>>>>
>>>>  -- 
>>>> 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.

Reply via email to