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

pack-priv abstract Class ScriptBase

extends Prepared
Class Inheritance
Known Direct Subclasses
org.h2.command.dml.ScriptCommand, org.h2.command.dml.RunScriptCommand
Imports
java.io.BufferedOutputStream, .BufferedReader, .IOException, .InputStream, .InputStreamReader, .OutputStream, java.nio.charset.Charset, org.h2.api.ErrorCode, org.h2.command.Prepared, org.h2.engine.Constants, .Database, .SessionLocal, .SysProperties, org.h2.expression.Expression, org.h2.message.DbException, org.h2.security.SHA256, org.h2.store.FileStore, .FileStoreInputStream, .FileStoreOutputStream, org.h2.store.fs.FileUtils, org.h2.tools.CompressTool, org.h2.util.IOUtils, .StringUtils

This class is the base for RunScriptCommand and ScriptCommand.

Field Summary

Modifier and TypeField and Description
private String
private String
private String
private Expression
fileNameExpr

The file name (if set).

protected OutputStream
out

The output stream.

private Expression
protected BufferedReader
reader

The input reader.

private static final String
SCRIPT_SQL

The default name of the script file if .zip compression is used.

private FileStore
Inherited from org.h2.command.Prepared:
createparametersprepareAlwayssessionsqlStatementsqlTokens

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
closeIO()

Close input and output streams.

pack-priv void
deleteStore()

Delete the target file.

protected String
private void
private boolean
public boolean
isTransactional()

Implements abstract org.h2.command.Prepared.isTransactional.

Check if this command is transactional.

public boolean
needRecompile()

Overrides org.h2.command.Prepared.needRecompile.

Check if the statement needs to be re-compiled.

pack-priv void
openInput(Charset
the charset to use
charset
)

Open the input stream.

pack-priv void
openOutput()

Open the output stream.

public void
public void
public void
public void
Inherited from org.h2.command.Prepared:
checkCanceledcheckParameterscollectDependenciesgetCurrentRowNumbergetDatabasegetObjectIdgetParametersgetPersistedObjectIdgetPlanSQLgetPlanSQLgetSessiongetSimpleSQLgetSQLgetSQLTokensgetTypeisCacheableisQueryisReadOnlyisRetryableisWithParamValuespreparequeryqueryMetasetCommandsetCurrentRowNumbersetParameterListsetPersistedObjectIdsetPrepareAlwayssetRowsetSessionsetSQLsetWithParamValuestoStringupdate

Field Detail

cipherback to summary
private String cipher
compressionAlgorithmback to summary
private String compressionAlgorithm
fileNameback to summary
private String fileName
fileNameExprback to summary
private Expression fileNameExpr

The file name (if set).

outback to summary
protected OutputStream out

The output stream.

passwordback to summary
private Expression password
readerback to summary
protected BufferedReader reader

The input reader.

SCRIPT_SQLback to summary
private static final String SCRIPT_SQL

The default name of the script file if .zip compression is used.

storeback to summary
private FileStore store

Constructor Detail

ScriptBaseback to summary
pack-priv ScriptBase(SessionLocal session)

Method Detail

closeIOback to summary
pack-priv void closeIO()

Close input and output streams.

deleteStoreback to summary
pack-priv void deleteStore()

Delete the target file.

getFileNameback to summary
protected String getFileName()
initStoreback to summary
private void initStore()
isEncryptedback to summary
private boolean isEncrypted()
isTransactionalback to summary
public boolean isTransactional()

Implements abstract org.h2.command.Prepared.isTransactional.

Doc from org.h2.command.Prepared.isTransactional.

Check if this command is transactional. If it is not, then it forces the current transaction to commit.

Returns:boolean

true if it is

Annotations
@Override
needRecompileback to summary
public boolean needRecompile()

Overrides org.h2.command.Prepared.needRecompile.

Doc from org.h2.command.Prepared.needRecompile.

Check if the statement needs to be re-compiled.

Returns:boolean

true if it must

Annotations
@Override
openInputback to summary
pack-priv void openInput(Charset charset)

Open the input stream.

Parameters
charset:Charset

the charset to use

openOutputback to summary
pack-priv void openOutput()

Open the output stream.

setCipherback to summary
public void setCipher(String c)
setCompressionAlgorithmback to summary
public void setCompressionAlgorithm(String algorithm)
setFileNameExprback to summary
public void setFileNameExpr(Expression file)
setPasswordback to summary
public void setPassword(Expression password)