-
for instance, something like (kotlin code): val rowsUpdated = context.update(TABLE).set(mapOf<Field<*>, Any>()).where(...).execute()
// rowsUpdated = 0 does not throw as I would expect in SQL when leaving out |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
SQL doesn't support an empty
I would assume that if SQL supported the syntax, then 1) would be the correct approach, similar to running a You cannot change this behaviour, but you can intercept such statements by implementing an |
Beta Was this translation helpful? Give feedback.
SQL doesn't support an empty
SET
clause, but jOOQ does. The question is: What does it mean for an empty set clause to be passed? It could mean two things:WHERE
clause should be locked, but nothing should be changedI would assume that if SQL supported the syntax, then 1) would be the correct approach, similar to running a
SELECT .. FOR UPDATE
, though theUPDATE
would actually fire triggers.You cannot change this behaviour, but you can intercept such statements by implementing an
ExecuteListener
and checkingexecuteContext.query() instanceof QOM.Update u…