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

public final Class SetClauseList

extends Object
implements HasSQL
Class Inheritance
All Implemented Interfaces
org.h2.util.HasSQL
Imports
java.util.ArrayList, .Arrays, org.h2.api.ErrorCode, org.h2.engine.Constants, .SessionLocal, org.h2.expression.Expression, .ExpressionList, .ExpressionVisitor, .Parameter, .ValueExpression, org.h2.message.DbException, org.h2.result.LocalResult, .ResultTarget, .Row, org.h2.table.Column, .ColumnResolver, .DataChangeDeltaTable.ResultOption, .Table, org.h2.util.HasSQL, org.h2.value.Value, .ValueArray, .ValueNull

Set clause list.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private abstract static class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private final SetClauseList.UpdateAction[]
private boolean
private final Table

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addMultiple(ArrayList<Column>
the columns
columns
,
ArrayList<Expression[]>
list of non-empty arrays of indexes for array element assignments, or null values for simple assignments
allIndexes
,
Expression
the expression (e.g. an expression list)
expression
)

Add multiple columns.

public void
addSingle(Column
the column
column
,
Expression[]
non-empty array of indexes for array element assignment, or null for simple assignment
arrayIndexes
,
Expression
the expression
expression
)

Add a single column.

public StringBuilder
getSQL(StringBuilder
string builder
builder
,
int
formatting flags
sqlFlags
)

Implements org.h2.util.HasSQL.getSQL.

Appends the SQL statement of this object to the specified builder.

pack-priv boolean

Returns:

if the criteria can be fulfilled
isEverything
(ExpressionVisitor
the visitor
visitor
)

Check if this expression and all sub-expressions can fulfill a criteria.

pack-priv void
mapAndOptimize(SessionLocal
the session
session
,
ColumnResolver
the first column resolver
resolver1
,
ColumnResolver
the second column resolver, or null
resolver2
)

Map the columns and optimize expressions.

pack-priv boolean
prepareUpdate(Table table, SessionLocal session, ResultTarget deltaChangeCollector, DataChangeDeltaTable.ResultOption deltaChangeCollectionMode, LocalResult rows, Row oldRow, boolean updateToCurrentValuesReturnsZero)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

actionsback to summary
private final SetClauseList.UpdateAction[] actions
onUpdateback to summary
private boolean onUpdate
tableback to summary
private final Table table

Constructor Detail

SetClauseListback to summary
public SetClauseList(Table table)

Method Detail

addMultipleback to summary
public void addMultiple(ArrayList<Column> columns, ArrayList<Expression[]> allIndexes, Expression expression)

Add multiple columns.

Parameters
columns:ArrayList<Column>

the columns

allIndexes:ArrayList<Expression[]>

list of non-empty arrays of indexes for array element assignments, or null values for simple assignments

expression:Expression

the expression (e.g. an expression list)

addSingleback to summary
public void addSingle(Column column, Expression[] arrayIndexes, Expression expression)

Add a single column.

Parameters
column:Column

the column

arrayIndexes:Expression[]

non-empty array of indexes for array element assignment, or null for simple assignment

expression:Expression

the expression

getSQLback to summary
public StringBuilder getSQL(StringBuilder builder, int sqlFlags)

Implements org.h2.util.HasSQL.getSQL.

Doc from org.h2.util.HasSQL.getSQL.

Appends the SQL statement of this object to the specified builder.

Parameters
builder:StringBuilder

string builder

sqlFlags:int

formatting flags

Returns:StringBuilder

the specified string builder

Annotations
@Override
isEverythingback to summary
pack-priv boolean isEverything(ExpressionVisitor visitor)

Check if this expression and all sub-expressions can fulfill a criteria. If any part returns false, the result is false.

Parameters
visitor:ExpressionVisitor

the visitor

Returns:boolean

if the criteria can be fulfilled

mapAndOptimizeback to summary
pack-priv void mapAndOptimize(SessionLocal session, ColumnResolver resolver1, ColumnResolver resolver2)

Map the columns and optimize expressions.

Parameters
session:SessionLocal

the session

resolver1:ColumnResolver

the first column resolver

resolver2:ColumnResolver

the second column resolver, or null

prepareUpdateback to summary
pack-priv boolean prepareUpdate(Table table, SessionLocal session, ResultTarget deltaChangeCollector, DataChangeDeltaTable.ResultOption deltaChangeCollectionMode, LocalResult rows, Row oldRow, boolean updateToCurrentValuesReturnsZero)
org.h2.command.dml back to summary

private final Class SetClauseList.RowExpression

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final int[]
pack-priv Expression
pack-priv Value[]

Constructor Summary

AccessConstructor and Description
pack-priv
RowExpression(Expression expression, int[] columns)

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

columnsback to summary
pack-priv final int[] columns
expressionback to summary
pack-priv Expression expression
valuesback to summary
pack-priv Value[] values

Constructor Detail

RowExpressionback to summary
pack-priv RowExpression(Expression expression, int[] columns)

Method Detail

isEverythingback to summary
pack-priv boolean isEverything(ExpressionVisitor visitor)
mapAndOptimizeback to summary
pack-priv void mapAndOptimize(SessionLocal session, ColumnResolver resolver1, ColumnResolver resolver2)
org.h2.command.dml back to summary

private abstract Class SetClauseList.SetAction

extends UpdateAction
Class Inheritance
Known Direct Subclasses
org.h2.command.dml.SetClauseList.SetSimple, org.h2.command.dml.SetClauseList.SetMultiple

Field Summary

Modifier and TypeField and Description
private final Expression[]
Inherited from org.h2.command.dml.SetClauseList.UpdateAction:
ON_UPDATESET_DEFAULT

Constructor Summary

AccessConstructor and Description
pack-priv
SetAction(Expression[] arrayIndexes)

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
pack-priv void
pack-priv final Value
pack-priv abstract Value
private Value
updateArray(SessionLocal session, Value oldValue, Value newValue, int indexNumber)

Inherited from org.h2.command.dml.SetClauseList.UpdateAction:
getSQL

Field Detail

arrayIndexesback to summary
private final Expression[] arrayIndexes

Constructor Detail

SetActionback to summary
pack-priv SetAction(Expression[] arrayIndexes)

Method Detail

isEverythingback to summary
pack-priv boolean isEverything(ExpressionVisitor visitor)

Overrides org.h2.command.dml.SetClauseList.UpdateAction.isEverything.

Annotations
@Override
mapAndOptimizeback to summary
pack-priv void mapAndOptimize(SessionLocal session, ColumnResolver resolver1, ColumnResolver resolver2)

Overrides org.h2.command.dml.SetClauseList.UpdateAction.mapAndOptimize.

Annotations
@Override
updateback to summary
pack-priv final Value update(SessionLocal session, Value oldValue)

Overrides org.h2.command.dml.SetClauseList.UpdateAction.update.

Annotations
@Override
updateback to summary
pack-priv abstract Value update(SessionLocal session)
updateArrayback to summary
private Value updateArray(SessionLocal session, Value oldValue, Value newValue, int indexNumber)
org.h2.command.dml back to summary

private final Class SetClauseList.SetMultiple

extends SetAction
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv boolean
private boolean
private final int
pack-priv final SetClauseList.RowExpression

Constructor Summary

AccessConstructor and Description
pack-priv
SetMultiple(Expression[] arrayIndexes, SetClauseList.RowExpression row, int position, boolean first, boolean last)

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
pack-priv void
pack-priv Value
Inherited from org.h2.command.dml.SetClauseList.SetAction:
update

Field Detail

firstback to summary
pack-priv boolean first
lastback to summary
private boolean last
positionback to summary
private final int position
rowback to summary
pack-priv final SetClauseList.RowExpression row

Constructor Detail

SetMultipleback to summary
pack-priv SetMultiple(Expression[] arrayIndexes, SetClauseList.RowExpression row, int position, boolean first, boolean last)

Method Detail

isEverythingback to summary
pack-priv boolean isEverything(ExpressionVisitor visitor)

Overrides org.h2.command.dml.SetClauseList.SetAction.isEverything.

Annotations
@Override
mapAndOptimizeback to summary
pack-priv void mapAndOptimize(SessionLocal session, ColumnResolver resolver1, ColumnResolver resolver2)

Overrides org.h2.command.dml.SetClauseList.SetAction.mapAndOptimize.

Annotations
@Override
updateback to summary
pack-priv Value update(SessionLocal session)

Implements abstract org.h2.command.dml.SetClauseList.SetAction.update.

Annotations
@Override
org.h2.command.dml back to summary

private final Class SetClauseList.SetSimple

extends SetAction
Class Inheritance

Field Summary

Modifier and TypeField and Description
private Expression

Constructor Summary

AccessConstructor and Description
pack-priv
SetSimple(Expression[] arrayIndexes, Expression expression)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv boolean
pack-priv void
pack-priv Value
Inherited from org.h2.command.dml.SetClauseList.SetAction:
update

Field Detail

expressionback to summary
private Expression expression

Constructor Detail

SetSimpleback to summary
pack-priv SetSimple(Expression[] arrayIndexes, Expression expression)

Method Detail

getSQLback to summary
pack-priv void getSQL(StringBuilder builder, int sqlFlags, Column column)

Overrides org.h2.command.dml.SetClauseList.UpdateAction.getSQL.

Annotations
@Override
isEverythingback to summary
pack-priv boolean isEverything(ExpressionVisitor visitor)

Overrides org.h2.command.dml.SetClauseList.SetAction.isEverything.

Annotations
@Override
mapAndOptimizeback to summary
pack-priv void mapAndOptimize(SessionLocal session, ColumnResolver resolver1, ColumnResolver resolver2)

Overrides org.h2.command.dml.SetClauseList.SetAction.mapAndOptimize.

Annotations
@Override
updateback to summary
pack-priv Value update(SessionLocal session)

Implements abstract org.h2.command.dml.SetClauseList.SetAction.update.

Annotations
@Override
org.h2.command.dml back to summary

private Class SetClauseList.UpdateAction

extends Object
Class Inheritance
Known Direct Subclasses
org.h2.command.dml.SetClauseList.SetAction

Field Summary

Modifier and TypeField and Description
pack-priv static SetClauseList.UpdateAction
pack-priv static SetClauseList.UpdateAction

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
getSQL(StringBuilder builder, int sqlFlags, Column column)

pack-priv boolean
pack-priv void
pack-priv Value
update(SessionLocal session, Value oldValue)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ON_UPDATEback to summary
pack-priv static SetClauseList.UpdateAction ON_UPDATE
SET_DEFAULTback to summary
pack-priv static SetClauseList.UpdateAction SET_DEFAULT

Constructor Detail

UpdateActionback to summary
pack-priv UpdateAction()

Method Detail

getSQLback to summary
pack-priv void getSQL(StringBuilder builder, int sqlFlags, Column column)
isEverythingback to summary
pack-priv boolean isEverything(ExpressionVisitor visitor)
mapAndOptimizeback to summary
pack-priv void mapAndOptimize(SessionLocal session, ColumnResolver resolver1, ColumnResolver resolver2)
updateback to summary
pack-priv Value update(SessionLocal session, Value oldValue)