Package org.h2.command.query
Class ForUpdate
java.lang.Object
org.h2.command.query.ForUpdate
- All Implemented Interfaces:
HasSQL
FOR UPDATE clause.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ForUpdateFOR UPDATE clause without additional parameters.static final ForUpdateFOR UPDATE NOWAIT clause.static final ForUpdateFOR UPDATE SKIP LOCKED clause.Fields inherited from interface org.h2.util.HasSQL
ADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS -
Method Summary
Modifier and TypeMethodDescriptiongetSQL(StringBuilder builder, int sqlFlags) Appends the SQL statement of this object to the specified builder.intReturns timeout in milliseconds.getType()Returns type of FOR UPDATE clause.static ForUpdatewait(int timeoutMillis) Returns FOR UPDATE WAIT N clause.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.h2.util.HasSQL
getSQL, getTraceSQL
-
Field Details
-
DEFAULT
FOR UPDATE clause without additional parameters. -
NOWAIT
FOR UPDATE NOWAIT clause. -
SKIP_LOCKED
FOR UPDATE SKIP LOCKED clause.
-
-
Method Details
-
wait
Returns FOR UPDATE WAIT N clause.- Parameters:
timeoutMillis- timeout in milliseconds- Returns:
- FOR UPDATE WAIT N clause
-
getType
Returns type of FOR UPDATE clause.- Returns:
- type of FOR UPDATE clause
-
getTimeoutMillis
public int getTimeoutMillis()Returns timeout in milliseconds.- Returns:
- timeout in milliseconds for
ForUpdate.Type.WAIT,0forForUpdate.Type.NOWAIT,-2forForUpdate.Type.SKIP_LOCKED,-1for default timeout
-
getSQL
Description copied from interface:HasSQLAppends the SQL statement of this object to the specified builder.
-