Class RDBMSConditionalUpdateAction
java.lang.Object
com.kingsrook.qqq.backend.module.rdbms.actions.AbstractRDBMSAction
com.kingsrook.qqq.backend.module.rdbms.actions.RDBMSConditionalUpdateAction
- All Implemented Interfaces:
ConditionalUpdateInterface
public class RDBMSConditionalUpdateAction
extends AbstractRDBMSAction
implements ConditionalUpdateInterface
RDBMS conditional update: one
UPDATE t SET ... WHERE <filter>
statement, so the compare and the set are atomic in the database. Runs in the
caller's transaction when one is given.-
Field Summary
Fields inherited from class com.kingsrook.qqq.backend.module.rdbms.actions.AbstractRDBMSAction
actionStrategy, backendMetaData, isCancelled, queryStat, statement -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondatabaseNow(QBackendMetaData backend) The database clock, read with one SELECT.intexecute(ConditionalUpdateInput input) Run the update; return the number of rows updated.Methods inherited from class com.kingsrook.qqq.backend.module.rdbms.actions.AbstractRDBMSAction
bindExpressionTemplate, clonedOrNewFilter, doCancelQuery, doesSelectClauseRequireDistinct, escapeIdentifier, fieldExpression, getActionStrategy, getColumnName, getConnection, getFieldValueFromResultSet, getFieldValueFromResultSet, getQueryStat, getSingleGroupByClause, getTableName, logSQL, makeFieldNameToColumnReferenceFunction, makeFromClause, makeFromClause, makeOrderByClause, makeWhereClause, requireFieldFunctionAdapterNotNull, scrubValue, scrubValue, scrubValue, setBackendMetaData, setLogSQL, setLogSQL, setLogSQLOutput, setLogSQLReformat, setQueryStat, setSqlAndJoinsInQueryStat, setValueIfTableHasField
-
Constructor Details
-
RDBMSConditionalUpdateAction
public RDBMSConditionalUpdateAction()
-
-
Method Details
-
execute
Description copied from interface:ConditionalUpdateInterfaceRun the update; return the number of rows updated.- Specified by:
executein interfaceConditionalUpdateInterface- Throws:
QException
-
databaseNow
The database clock, read with one SELECT. Vendors differ in how they hand back the current time, so each is read as UTC explicitly.- Specified by:
databaseNowin interfaceConditionalUpdateInterface- Throws:
QException
-