Package org.h2.command.dml
Class RunScriptCommand
- java.lang.Object
-
- org.h2.command.Prepared
-
- org.h2.command.dml.ScriptBase
-
- org.h2.command.dml.RunScriptCommand
-
public class RunScriptCommand extends ScriptBase
This class represents the statement RUNSCRIPT
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.charset.Charsetcharsetprivate booleanfrom1Xprivate booleanquirksModeprivate static charUTF8_BOMThe byte order mark.private booleanvariableBinary-
Fields inherited from class org.h2.command.dml.ScriptBase
out, 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 private voidexecute(java.lang.String sql)intgetType()Get the command type as defined in CommandInterfaceResultInterfacequeryMeta()Get an empty result set containing the meta data.voidsetCharset(java.nio.charset.Charset charset)voidsetFrom1X()Enables quirks for parsing scripts from H2 1.*.*.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.dml.ScriptBase
closeIO, deleteStore, getFileName, isTransactional, needRecompile, openInput, openOutput, setCipher, setCompressionAlgorithm, setFileNameExpr, setPassword
-
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
-
UTF8_BOM
private static final char UTF8_BOM
The byte order mark. 0xfeff because this is the Unicode char represented by the UTF-8 byte order mark (EF BB BF).- See Also:
- Constant Field Values
-
charset
private java.nio.charset.Charset charset
-
quirksMode
private boolean quirksMode
-
variableBinary
private boolean variableBinary
-
from1X
private boolean from1X
-
-
Constructor Detail
-
RunScriptCommand
public RunScriptCommand(SessionLocal session)
-
-
Method Detail
-
update
public long update()
Description copied from class:PreparedExecute the statement.
-
execute
private void execute(java.lang.String sql)
-
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 meta data.
-
-