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.Charset
charset
private boolean
from1X
private boolean
quirksMode
private static char
UTF8_BOM
The byte order mark.private boolean
variableBinary
-
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 void
execute(java.lang.String sql)
int
getType()
Get the command type as defined in CommandInterfaceResultInterface
queryMeta()
Get an empty result set containing the meta data.void
setCharset(java.nio.charset.Charset charset)
void
setFrom1X()
Enables quirks for parsing scripts from H2 1.*.*.void
setQuirksMode(boolean quirksMode)
Enables or disables the quirks mode.void
setVariableBinary(boolean variableBinary)
Changes parsing of a BINARY data type.long
update()
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:Prepared
Execute 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
-true
to parse BINARY as VARBINARY,false
to parse it as is
-
setFrom1X
public void setFrom1X()
Enables quirks for parsing scripts from H2 1.*.*.
-
queryMeta
public ResultInterface queryMeta()
Description copied from class:Prepared
Get an empty result set containing the meta data.
-
-