Package org.h2.command.dml
Class Delete
- java.lang.Object
-
- org.h2.command.Prepared
-
- org.h2.command.dml.DataChangeStatement
-
- org.h2.command.dml.Delete
-
public final class Delete extends DataChangeStatement
This class represents the statement DELETE
-
-
Field Summary
-
Fields inherited from class org.h2.command.Prepared
create, parameters, prepareAlways, session, sqlStatement, sqlTokens
-
-
Constructor Summary
Constructors Constructor Description Delete(SessionLocal session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringBuilderappendFilterCondition(java.lang.StringBuilder builder, int sqlFlags)voidcollectDependencies(java.util.HashSet<DbObject> dependencies)Find and collect all DbObjects, this Prepared depends on.ExpressiongetCondition()java.lang.StringBuildergetPlanSQL(java.lang.StringBuilder builder, int sqlFlags)Appends the SQL statement with the execution plan.java.lang.StringgetStatementName()Return the name of this statement.TablegetTable()Return the target table.TableFiltergetTableFilter()intgetType()Get the command type as defined in CommandInterfaceprotected RowlockAndRecheckCondition()protected booleannextRow(long limitRows, long count)voidsetCondition(Expression condition)voidsetFetch(Expression fetch)voidsetTableFilter(TableFilter tableFilter)longupdate(ResultTarget deltaChangeCollector, DataChangeDeltaTable.ResultOption deltaChangeCollectionMode)Execute the statement with specified delta change collector and collection mode.-
Methods inherited from class org.h2.command.dml.DataChangeStatement
isCacheable, isTransactional, lockAndRecheckCondition, prepare, queryMeta, update
-
Methods inherited from class org.h2.command.Prepared
checkCanceled, checkParameters, getCurrentRowNumber, getDatabase, getObjectId, getParameters, getPersistedObjectId, getPlanSQL, getSession, getSimpleSQL, getSQL, getSQLTokens, invalidateCachedResult, isQuery, isReadOnly, isRetryable, isWithParamValues, needRecompile, query, setCommand, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, setWithParamValues, toString
-
-
-
-
Constructor Detail
-
Delete
public Delete(SessionLocal session)
-
-
Method Detail
-
update
public long update(ResultTarget deltaChangeCollector, DataChangeDeltaTable.ResultOption deltaChangeCollectionMode)
Description copied from class:DataChangeStatementExecute the statement with specified delta change collector and collection mode.- Specified by:
updatein classDataChangeStatement- Parameters:
deltaChangeCollector- target resultdeltaChangeCollectionMode- collection mode- Returns:
- the update count
-
getPlanSQL
public java.lang.StringBuilder getPlanSQL(java.lang.StringBuilder builder, int sqlFlags)Description copied from class:PreparedAppends the SQL statement with the execution plan.- Overrides:
getPlanSQLin classPrepared- Parameters:
builder- string buildersqlFlags- formatting flags- Returns:
- the execution plan
-
getType
public int getType()
Description copied from class:PreparedGet the command type as defined in CommandInterface
-
getStatementName
public java.lang.String getStatementName()
Description copied from class:DataChangeStatementReturn the name of this statement.- Specified by:
getStatementNamein classDataChangeStatement- Returns:
- the short name of this statement.
-
collectDependencies
public void collectDependencies(java.util.HashSet<DbObject> dependencies)
Description copied from class:PreparedFind and collect all DbObjects, this Prepared depends on.- Overrides:
collectDependenciesin classPrepared- Parameters:
dependencies- collection of dependencies to populate
-
getTable
public final Table getTable()
Description copied from class:DataChangeStatementReturn the target table.- Specified by:
getTablein classDataChangeStatement- Returns:
- the target table
-
setTableFilter
public final void setTableFilter(TableFilter tableFilter)
-
getTableFilter
public final TableFilter getTableFilter()
-
setCondition
public final void setCondition(Expression condition)
-
getCondition
public final Expression getCondition()
-
setFetch
public void setFetch(Expression fetch)
-
nextRow
protected final boolean nextRow(long limitRows, long count)
-
appendFilterCondition
protected final java.lang.StringBuilder appendFilterCondition(java.lang.StringBuilder builder, int sqlFlags)
-
lockAndRecheckCondition
protected final Row lockAndRecheckCondition()
-
-