Top Description Fields Constructors Methods
org.h2.command.dml

public final Class Update

extends FilteredDataChangeStatement
Class Inheritance
Imports
java.util.HashSet, org.h2.api.Trigger, org.h2.command.CommandInterface, .Prepared, org.h2.command.query.AllColumnsForPlan, org.h2.engine.DbObject, .Right, .SessionLocal, org.h2.expression.Expression, .ExpressionVisitor, org.h2.message.DbException, org.h2.result.LocalResult, .ResultTarget, .Row, org.h2.table.DataChangeDeltaTable.ResultOption, .PlanItem, .Table, .TableFilter, org.h2.value.Value, .ValueNull

This class represents the statement UPDATE

Field Summary

Modifier and TypeField and Description
private Insert
private SetClauseList
Inherited from org.h2.command.dml.FilteredDataChangeStatement:
conditionfetchExprtargetTableFilter

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
collectDependencies(HashSet<DbObject>
collection of dependencies to populate
dependencies
)

Overrides org.h2.command.Prepared.collectDependencies.

Find and collect all DbObjects, this Prepared depends on.

pack-priv void
pack-priv static void
doUpdate(Prepared prepared, SessionLocal session, Table table, LocalResult rows)

public Insert
public StringBuilder
getPlanSQL(StringBuilder
string builder
builder
,
int
formatting flags
sqlFlags
)

Overrides org.h2.command.Prepared.getPlanSQL.

Appends the SQL statement with the execution plan.

public String
getStatementName()

Implements abstract org.h2.command.dml.DataChangeStatement.getStatementName.

Return the name of this statement.

public int
getType()

Implements abstract org.h2.command.Prepared.getType.

Get the command type as defined in CommandInterface

pack-priv void
setOnDuplicateKeyInsert(Insert onDuplicateKeyInsert)

public void
public long
update(ResultTarget
target result
deltaChangeCollector
,
DataChangeDeltaTable.ResultOption
collection mode
deltaChangeCollectionMode
)

Implements abstract org.h2.command.dml.DataChangeStatement.update.

Execute the statement with specified delta change collector and collection mode.

Inherited from org.h2.command.dml.FilteredDataChangeStatement:
appendFilterConditiongetConditiongetTablegetTableFilternextRowsetConditionsetFetchsetTableFilter

Field Detail

onDuplicateKeyInsertback to summary
private Insert onDuplicateKeyInsert
setClauseListback to summary
private SetClauseList setClauseList

Constructor Detail

Updateback to summary
public Update(SessionLocal session)

Method Detail

collectDependenciesback to summary
public void collectDependencies(HashSet<DbObject> dependencies)

Overrides org.h2.command.Prepared.collectDependencies.

Doc from org.h2.command.Prepared.collectDependencies.

Find and collect all DbObjects, this Prepared depends on.

Parameters
dependencies:HashSet<DbObject>

collection of dependencies to populate

Annotations
@Override
doPrepareback to summary
pack-priv void doPrepare()

Implements abstract org.h2.command.dml.DataChangeStatement.doPrepare.

Annotations
@Override
doUpdateback to summary
pack-priv static void doUpdate(Prepared prepared, SessionLocal session, Table table, LocalResult rows)
getOnDuplicateKeyInsertback to summary
public Insert getOnDuplicateKeyInsert()
getPlanSQLback to summary
public StringBuilder getPlanSQL(StringBuilder builder, int sqlFlags)

Overrides org.h2.command.Prepared.getPlanSQL.

Doc from org.h2.command.Prepared.getPlanSQL.

Appends the SQL statement with the execution plan.

Parameters
builder:StringBuilder

string builder

sqlFlags:int

formatting flags

Returns:StringBuilder

the execution plan

Annotations
@Override
getStatementNameback to summary
public String getStatementName()

Implements abstract org.h2.command.dml.DataChangeStatement.getStatementName.

Doc from org.h2.command.dml.DataChangeStatement.getStatementName.

Return the name of this statement.

Returns:String

the short name of this statement.

Annotations
@Override
getTypeback to summary
public int getType()

Implements abstract org.h2.command.Prepared.getType.

Doc from org.h2.command.Prepared.getType.

Get the command type as defined in CommandInterface

Returns:int

the statement type

Annotations
@Override
setOnDuplicateKeyInsertback to summary
pack-priv void setOnDuplicateKeyInsert(Insert onDuplicateKeyInsert)
setSetClauseListback to summary
public void setSetClauseList(SetClauseList setClauseList)
updateback to summary
public long update(ResultTarget deltaChangeCollector, DataChangeDeltaTable.ResultOption deltaChangeCollectionMode)

Implements abstract org.h2.command.dml.DataChangeStatement.update.

Doc from org.h2.command.dml.DataChangeStatement.update.

Execute the statement with specified delta change collector and collection mode.

Parameters
deltaChangeCollector:ResultTarget

target result

deltaChangeCollectionMode:DataChangeDeltaTable.ResultOption

collection mode

Returns:long

the update count

Annotations
@Override