Interface LockingClauseStrategy
Strategy for dealing with locking via a SQL FOR UPDATE (OF)
clause.
Some dialects do not use a FOR UPDATE (OF) to apply
locks - e.g., they apply locks in the FROM clause. Such
dialects would return a no-op version of this contract.
Some dialects support an additional FOR SHARE (OF) clause
as well to acquire non-exclusive locks. That is also handled here,
varied by the requested LockMode.
Operates in 2 "phases"-
- collect tables which are to be locked (based on Locking.Scope, and other things)
- render the appropriate locking fragment
- See Also:
- Implementation Specification:
Note that this is also used to determine and track which tables to lock even for cases (T-SQL e.g.) where a "locking clause" per-se won't be used. In such cases, only the first phase (along with
andinvalid reference
#shouldLockRoot) have any impact.invalid reference
#shouldLockJoin
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanregisterJoin(TableGroupJoin join) Register the given joinbooleanregisterRoot(TableGroup root) Register the given rootvoidrender(SqlAppender sqlAppender) For cases where a locking clause is to be used, render that locking clause.
-
Method Details
-
registerRoot
-
registerJoin
-
containsOuterJoins
-
render
For cases where a locking clause is to be used, render that locking clause. -
getPathsToLock
Collection<NavigablePath> getPathsToLock()
-