public class Update extends Prepared implements DataChangeStatement
create, parameters, prepareAlways, session, sqlStatement| Modifier and Type | Method and Description |
|---|---|
void |
collectDependencies(java.util.HashSet<DbObject> dependencies)
Find and collect all DbObjects, this Prepared depends on.
|
Expression |
getCondition() |
java.lang.String |
getPlanSQL(boolean alwaysQuote)
Get the SQL statement with the execution plan.
|
TableFilter |
getSourceTableFilter() |
java.lang.String |
getStatementName()
Return the name of this statement.
|
Table |
getTable()
Return the target table.
|
int |
getType()
Get the command type as defined in CommandInterface
|
boolean |
isCacheable() |
boolean |
isTransactional()
Check if this command is transactional.
|
void |
prepare()
Prepare this statement.
|
ResultInterface |
queryMeta()
Get an empty result set containing the meta data.
|
void |
setAssignment(Column column,
Expression expression)
Add an assignment of the form column = expression.
|
void |
setCondition(Expression condition) |
void |
setDeltaChangeCollector(ResultTarget deltaChangeCollector,
DataChangeDeltaTable.ResultOption deltaChangeCollectionMode)
Set the delta change collector and collection mode.
|
void |
setLimit(Expression limit) |
void |
setSourceTableFilter(TableFilter sourceTableFilter) |
void |
setTableFilter(TableFilter tableFilter) |
void |
setUpdatedKeysCollector(java.util.HashSet<java.lang.Long> updatedKeysCollector)
Sets the collector of updated keys.
|
void |
setUpdateToCurrentValuesReturnsZero(boolean updateToCurrentValuesReturnsZero)
Sets expected update count for update to current values case.
|
int |
update()
Execute the statement.
|
checkCanceled, checkParameters, getCteCleanups, getCurrentRowNumber, getObjectId, getParameters, getPersistedObjectId, getSession, getSimpleSQL, getSQL, getSQL, isQuery, isReadOnly, needRecompile, query, setCommand, setCteCleanups, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSQLpublic Update(Session session)
public Table getTable()
DataChangeStatementgetTable in interface DataChangeStatementpublic void setTableFilter(TableFilter tableFilter)
public void setCondition(Expression condition)
public Expression getCondition()
public void setAssignment(Column column, Expression expression)
column - the columnexpression - the expressionpublic void setUpdatedKeysCollector(java.util.HashSet<java.lang.Long> updatedKeysCollector)
updatedKeysCollector - the collector of updated keyspublic void setDeltaChangeCollector(ResultTarget deltaChangeCollector, DataChangeDeltaTable.ResultOption deltaChangeCollectionMode)
DataChangeStatementsetDeltaChangeCollector in interface DataChangeStatementdeltaChangeCollector - target resultdeltaChangeCollectionMode - collection modepublic int update()
Preparedupdate in interface DataChangeStatementupdate in class Preparedpublic java.lang.String getPlanSQL(boolean alwaysQuote)
PreparedgetPlanSQL in class PreparedalwaysQuote - quote all identifierspublic void prepare()
Preparedprepare in interface DataChangeStatementprepare in class Preparedpublic boolean isTransactional()
PreparedisTransactional in class Preparedpublic ResultInterface queryMeta()
Preparedpublic int getType()
Preparedpublic java.lang.String getStatementName()
DataChangeStatementgetStatementName in interface DataChangeStatementpublic void setLimit(Expression limit)
public boolean isCacheable()
isCacheable in class Preparedpublic TableFilter getSourceTableFilter()
public void setSourceTableFilter(TableFilter sourceTableFilter)
public void setUpdateToCurrentValuesReturnsZero(boolean updateToCurrentValuesReturnsZero)
updateToCurrentValuesReturnsZero - if zero should be returned as update
count if update set row to current valuespublic void collectDependencies(java.util.HashSet<DbObject> dependencies)
PreparedcollectDependencies in class Prepareddependencies - collection of dependencies to populate