Package org.h2.command.dml
Class Set
- java.lang.Object
-
- org.h2.command.Prepared
-
- org.h2.command.dml.Set
-
public class Set extends Prepared
This class represents the statement SET
-
-
Field Summary
Fields Modifier and Type Field Description private Expressionexpressionprivate java.lang.StringstringValueprivate java.lang.String[]stringValueListprivate inttype-
Fields inherited from class org.h2.command.Prepared
create, parameters, prepareAlways, session, sqlStatement, sqlTokens
-
-
Constructor Summary
Constructors Constructor Description Set(SessionLocal session, int type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddOrUpdateSetting(java.lang.String name, java.lang.String s, int v)private voidaddOrUpdateSetting(SessionLocal session, java.lang.String name, java.lang.String s, int v)private intgetIntValue()intgetType()Get the command type as defined in CommandInterfacebooleanisTransactional()Check if this command is transactional.booleanneedRecompile()Check if the statement needs to be re-compiled.private static TimeZoneProviderparseTimeZone(Value v)ResultInterfacequeryMeta()Get an empty result set containing the meta data.voidsetExpression(Expression expression)voidsetInt(int value)voidsetString(java.lang.String v)voidsetStringArray(java.lang.String[] list)longupdate()Execute the statement.-
Methods inherited from class org.h2.command.Prepared
checkCanceled, checkParameters, collectDependencies, getCteCleanups, getCurrentRowNumber, getObjectId, getParameters, getPersistedObjectId, getPlanSQL, getSession, getSimpleSQL, getSQL, getSQLTokens, isCacheable, isQuery, isReadOnly, prepare, query, setCommand, setCteCleanups, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, toString
-
-
-
-
Field Detail
-
type
private final int type
-
expression
private Expression expression
-
stringValue
private java.lang.String stringValue
-
stringValueList
private java.lang.String[] stringValueList
-
-
Constructor Detail
-
Set
public Set(SessionLocal session, int type)
-
-
Method Detail
-
setString
public void setString(java.lang.String v)
-
isTransactional
public boolean isTransactional()
Description copied from class:PreparedCheck if this command is transactional. If it is not, then it forces the current transaction to commit.- Specified by:
isTransactionalin classPrepared- Returns:
- true if it is
-
update
public long update()
Description copied from class:PreparedExecute the statement.
-
parseTimeZone
private static TimeZoneProvider parseTimeZone(Value v)
-
getIntValue
private int getIntValue()
-
setInt
public void setInt(int value)
-
setExpression
public void setExpression(Expression expression)
-
addOrUpdateSetting
private void addOrUpdateSetting(java.lang.String name, java.lang.String s, int v)
-
addOrUpdateSetting
private void addOrUpdateSetting(SessionLocal session, java.lang.String name, java.lang.String s, int v)
-
needRecompile
public boolean needRecompile()
Description copied from class:PreparedCheck if the statement needs to be re-compiled.- Overrides:
needRecompilein classPrepared- Returns:
- true if it must
-
queryMeta
public ResultInterface queryMeta()
Description copied from class:PreparedGet an empty result set containing the meta data.
-
setStringArray
public void setStringArray(java.lang.String[] list)
-
-