Package org.h2.command.dml
Class RunScriptCommand
- java.lang.Object
-
- org.h2.command.Prepared
-
- org.h2.command.dml.RunScriptCommand
-
public class RunScriptCommand extends Prepared
This class represents the statement RUNSCRIPT
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.OutputStreamoutThe output stream.protected java.io.BufferedReaderreaderThe input reader.-
Fields inherited from class org.h2.command.Prepared
create, parameters, prepareAlways, session, sqlStatement, sqlTokens
-
-
Constructor Summary
Constructors Constructor Description RunScriptCommand(SessionLocal session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetFileName()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.ResultInterfacequeryMeta()Get an empty result set containing the metadata.voidsetCharset(java.nio.charset.Charset charset)voidsetCipher(java.lang.String c)voidsetCompressionAlgorithm(java.lang.String algorithm)voidsetFileNameExpr(Expression file)voidsetFrom1X()Enables quirks for parsing scripts from H2 1.*.*.voidsetPassword(Expression password)voidsetQuirksMode(boolean quirksMode)Enables or disables the quirks mode.voidsetVariableBinary(boolean variableBinary)Changes parsing of a BINARY data type.longupdate()Execute the statement.-
Methods inherited from class org.h2.command.Prepared
checkCanceled, checkParameters, collectDependencies, getCurrentRowNumber, getDatabase, getObjectId, getParameters, getPersistedObjectId, getPlanSQL, getPlanSQL, getSession, getSimpleSQL, getSQL, getSQLTokens, invalidateCachedResult, isCacheable, isQuery, isReadOnly, isRetryable, isWithParamValues, prepare, query, setCommand, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, setWithParamValues, toString
-
-
-
-
Constructor Detail
-
RunScriptCommand
public RunScriptCommand(SessionLocal session)
-
-
Method Detail
-
update
public long update()
Description copied from class:PreparedExecute the statement.
-
setCharset
public void setCharset(java.nio.charset.Charset charset)
-
setQuirksMode
public void setQuirksMode(boolean quirksMode)
Enables or disables the quirks mode.- Parameters:
quirksMode- whether quirks mode should be enabled
-
setVariableBinary
public void setVariableBinary(boolean variableBinary)
Changes parsing of a BINARY data type.- Parameters:
variableBinary-trueto parse BINARY as VARBINARY,falseto parse it as is
-
setFrom1X
public void setFrom1X()
Enables quirks for parsing scripts from H2 1.*.*.
-
queryMeta
public ResultInterface queryMeta()
Description copied from class:PreparedGet an empty result set containing the metadata.
-
getType
public int getType()
Description copied from class:PreparedGet the command type as defined in CommandInterface
-
setCipher
public void setCipher(java.lang.String c)
-
setPassword
public void setPassword(Expression password)
-
setFileNameExpr
public void setFileNameExpr(Expression file)
-
getFileName
protected java.lang.String getFileName()
-
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
-
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
-
setCompressionAlgorithm
public void setCompressionAlgorithm(java.lang.String algorithm)
-
-