... which reminds me, I should check why this slipped through the integration tests...
2014-04-14 19:39 GMT+02:00 Lukas Eder <[email protected]>: > Hello, > > Thanks for reporting this. I wasn't aware of Firebird going against the > standard here. I have registered an issue for this: > https://github.com/jOOQ/jOOQ/issues/3186 > > In the mean time, if you're sure that the jOOQ-Firebird integration should > render FOR UPDATE WITH LOCK, then you could attempt to replace your > generated SQL using an ExecuteListener. Upon the listener.renderEnd() > event, you could replace the SQL string as such: > > ctx.sql(ctx.sql().replaceAll("for update$", "for update with lock")); > > > See: > > http://www.jooq.org/javadoc/latest/org/jooq/impl/DefaultExecuteListener.html#renderEnd(org.jooq.ExecuteContext) > > Hope this helps and thanks again for reporting, > Lukas > > > 2014-04-11 12:04 GMT+02:00 <[email protected]>: > > Hi, >> >> in firebird the select .. for update statement it is very different than >> in other database >> >> https://www.ibphoenix.com/resources/documents/how_to/doc_109 >> >> particularly this passage : >> >> The Select For Update syntax has been present in InterBase for a long >> time but it has nothing to do with locking. During execution of a normal >> Select, records are sent to the client as packets. Although records are >> fetched by the application one by one, the client program (gds32, fbclient, >> libgds, etc.) gets from the server a packet of records of a requested size >> and buffers it. During execution of Select For Update the packets are >> formed of exactly one record. The next packet will be formed and fetched by >> the client only after the application requests it. Select For Update With >> Lock combines the functionality of Select For Update with a dummy update. >> In other words a new version of the record is created at the moment of >> fetch. It is the same thing that occurs when an update is posted, except >> that the triggers do not fire. So this statement can be used in all the >> above-mentioned cases instead of dummy update and you can forget about work >> of triggers. When using With Lock option remember that locks are released >> at the moment of the transaction end, not after the query is closed. >> >> So in JOOQ with a firebird db we don't obtain a lock when i use the >> forUpdate method >> >> ex : >> >> getDsl().select().from(MATABLE).forUpdate().fetch() => select * from >> matable for update >> >> i think for firebird it must generate => select * from matable for >> update with lock no ? >> >> >> -- >> 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]. For more options, visit https://groups.google.com/d/optout.
