locking

fun Query.locking(mode: LockingMode, tables: List<BaseTable<*>> = emptyList(), wait: LockingWait = WAIT): Query(source)
fun <E : Any, T : BaseTable<E>> EntitySequence<E, T>.locking(mode: LockingMode, tables: List<BaseTable<*>> = emptyList(), wait: LockingWait = WAIT): EntitySequence<E, T>(source)

Specify the locking clause of this query, an example generated SQL could be:

select ... for update of table_name nowait

Since

3.4.0

Parameters

tables

specific the tables, only rows coming from those tables would be locked.

wait

waiting strategy, one of WAIT, NOWAIT, SKIP_LOCKED.