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

public Class BackupCommand

extends Prepared
Class Inheritance
Imports
java.io.IOException, .OutputStream, java.util.ArrayList, java.util.zip.ZipOutputStream, org.h2.api.ErrorCode, org.h2.command.CommandInterface, .Prepared, org.h2.engine.Constants, .Database, .SessionLocal, org.h2.expression.Expression, org.h2.message.DbException, org.h2.mvstore.db.Store, org.h2.result.ResultInterface, org.h2.store.FileLister, org.h2.store.fs.FileUtils

This class represents the statement BACKUP

Field Summary

Modifier and TypeField and Description
private Expression
Inherited from org.h2.command.Prepared:
createparametersprepareAlwayssessionsqlStatementsqlTokens

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
backupTo(String fileName)

public static String

Returns:

the corrected file name
correctFileName
(String
the file name
f
)

Fix the file name, replacing backslash with slash.

public int
getType()

Implements abstract org.h2.command.Prepared.getType.

Get the command type as defined in CommandInterface

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.

public ResultInterface
queryMeta()

Implements abstract org.h2.command.Prepared.queryMeta.

Get an empty result set containing the meta data.

public void
public long
update()

Overrides org.h2.command.Prepared.update.

Execute the statement.

Inherited from org.h2.command.Prepared:
checkCanceledcheckParameterscollectDependenciesgetCurrentRowNumbergetDatabasegetObjectIdgetParametersgetPersistedObjectIdgetPlanSQLgetPlanSQLgetSessiongetSimpleSQLgetSQLgetSQLTokensisCacheableisQueryisReadOnlyisRetryableisWithParamValuespreparequerysetCommandsetCurrentRowNumbersetParameterListsetPersistedObjectIdsetPrepareAlwayssetRowsetSessionsetSQLsetWithParamValuestoString

Field Detail

fileNameExprback to summary
private Expression fileNameExpr

Constructor Detail

BackupCommandback to summary
public BackupCommand(SessionLocal session)

Method Detail

backupToback to summary
private void backupTo(String fileName)
correctFileNameback to summary
public static String correctFileName(String f)

Fix the file name, replacing backslash with slash.

Parameters
f:String

the file name

Returns:String

the corrected file name

getTypeback to summary
public int getType()

Implements abstract org.h2.command.Prepared.getType.

Doc from org.h2.command.Prepared.getType.

Get the command type as defined in CommandInterface

Returns:int

the statement type

Annotations
@Override
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
queryMetaback to summary
public ResultInterface queryMeta()

Implements abstract org.h2.command.Prepared.queryMeta.

Doc from org.h2.command.Prepared.queryMeta.

Get an empty result set containing the meta data.

Returns:ResultInterface

the result set

Annotations
@Override
setFileNameback to summary
public void setFileName(Expression fileName)
updateback to summary
public long update()

Overrides org.h2.command.Prepared.update.

Doc from org.h2.command.Prepared.update.

Execute the statement.

Returns:long

the update count

Annotations
@Override