Top Description Fields Constructors Methods
org.h2.command

pack-priv Class CommandList

extends Command
Class Inheritance
Imports
java.util.ArrayList, .HashSet, .Set, org.h2.engine.DbObject, .SessionLocal, org.h2.expression.Parameter, .ParameterInterface, org.h2.result.ResultInterface, .ResultWithGeneratedKeys

Represents a list of SQL statements.

Field Summary

Modifier and TypeField and Description
private final CommandContainer
private final ArrayList<Prepared>
private final ArrayList<Parameter>
private String
private Command
Inherited from org.h2.command.Command:
sessionstartTimeNanos

Constructor Summary

AccessConstructor and Description
pack-priv
CommandList(SessionLocal session, String sql, CommandContainer command, ArrayList<Prepared> commands, ArrayList<Parameter> parameters, String remaining)

Method Summary

Modifier and TypeMethod and Description
private void
public int
public Set<DbObject>
public ArrayList<? extends ParameterInterface>
getParameters()

Implements abstract org.h2.command.Command.getParameters.

Implements org.h2.command.CommandInterface.getParameters.

Get the list of parameters.

public boolean
isQuery()

Implements abstract org.h2.command.Command.isQuery.

Implements org.h2.command.CommandInterface.isQuery.

Check if this command is a query.

public boolean
isReadOnly()

Implements abstract org.h2.command.Command.isReadOnly.

Check if this command is read only.

protected boolean
isRetryable()

Implements abstract org.h2.command.Command.isRetryable.

Returns is this command can be repeated again on locking failure.

public boolean
isTransactional()

Implements abstract org.h2.command.Command.isTransactional.

Check if this command is transactional.

public ResultInterface
query(long
the maximum number of rows returned
maxrows
)

Implements abstract org.h2.command.Command.query.

Execute a query statement, if this is possible.

public ResultInterface
queryMeta()

Implements abstract org.h2.command.Command.queryMeta.

Get an empty result set containing the meta data.

public void
stop(boolean
commit the session if auto-commit is enabled
commitIfAutoCommit
)

Overrides org.h2.command.Command.stop.

Implements org.h2.command.CommandInterface.stop.

Stop the command execution, release all locks and resources.

public ResultWithGeneratedKeys
update(Object
false if generated keys are not needed, true if generated keys should be configured automatically, int[] to specify column indices to return generated keys from, or String[] to specify column names to return generated keys from
generatedKeysRequest
)

Implements abstract org.h2.command.Command.update.

Execute an updating statement (for example insert, delete, or update), if this is possible.

Inherited from org.h2.command.Command:
cancelcanReusecheckCanceledcloseexecuteBatchUpdateexecuteQueryexecuteUpdategetDatabasegetMetaDataisCacheablereusesetCanReusesetProgressstarttoString

Field Detail

commandback to summary
private final CommandContainer command
commandsback to summary
private final ArrayList<Prepared> commands
parametersback to summary
private final ArrayList<Parameter> parameters
remainingback to summary
private String remaining
remainingCommandback to summary
private Command remainingCommand

Constructor Detail

CommandListback to summary
pack-priv CommandList(SessionLocal session, String sql, CommandContainer command, ArrayList<Prepared> commands, ArrayList<Parameter> parameters, String remaining)

Method Detail

executeRemainingback to summary
private void executeRemaining()
getCommandTypeback to summary
public int getCommandType()

Implements org.h2.command.CommandInterface.getCommandType.

Doc from org.h2.command.CommandInterface.getCommandType.

Get command type.

Returns:int

one of the constants above

Annotations
@Override
getDependenciesback to summary
public Set<DbObject> getDependencies()

Implements abstract org.h2.command.Command.getDependencies.

Annotations
@Override
getParametersback to summary
public ArrayList<? extends ParameterInterface> getParameters()

Implements abstract org.h2.command.Command.getParameters.

Implements org.h2.command.CommandInterface.getParameters.

Doc from org.h2.command.Command.getParameters.

Get the list of parameters.

Returns:ArrayList<? extends ParameterInterface>

the list of parameters

Annotations
@Override
isQueryback to summary
public boolean isQuery()

Implements abstract org.h2.command.Command.isQuery.

Implements org.h2.command.CommandInterface.isQuery.

Doc from org.h2.command.Command.isQuery.

Check if this command is a query.

Returns:boolean

true if it is

Annotations
@Override
isReadOnlyback to summary
public boolean isReadOnly()

Implements abstract org.h2.command.Command.isReadOnly.

Doc from org.h2.command.Command.isReadOnly.

Check if this command is read only.

Returns:boolean

true if it is

Annotations
@Override
isRetryableback to summary
protected boolean isRetryable()

Implements abstract org.h2.command.Command.isRetryable.

Doc from org.h2.command.Command.isRetryable.

Returns is this command can be repeated again on locking failure.

Returns:boolean

is this command can be repeated again on locking failure

Annotations
@Override
isTransactionalback to summary
public boolean isTransactional()

Implements abstract org.h2.command.Command.isTransactional.

Doc from org.h2.command.Command.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
queryback to summary
public ResultInterface query(long maxrows)

Implements abstract org.h2.command.Command.query.

Doc from org.h2.command.Command.query.

Execute a query statement, if this is possible.

Parameters
maxrows:long

the maximum number of rows returned

Returns:ResultInterface

the local result set

Annotations
@Override
queryMetaback to summary
public ResultInterface queryMeta()

Implements abstract org.h2.command.Command.queryMeta.

Doc from org.h2.command.Command.queryMeta.

Get an empty result set containing the meta data.

Returns:ResultInterface

an empty result set

Annotations
@Override
stopback to summary
public void stop(boolean commitIfAutoCommit)

Overrides org.h2.command.Command.stop.

Implements org.h2.command.CommandInterface.stop.

Doc from org.h2.command.CommandInterface.stop.

Stop the command execution, release all locks and resources.

Parameters
commitIfAutoCommit:boolean

commit the session if auto-commit is enabled

Annotations
@Override
updateback to summary
public ResultWithGeneratedKeys update(Object generatedKeysRequest)

Implements abstract org.h2.command.Command.update.

Doc from org.h2.command.Command.update.

Execute an updating statement (for example insert, delete, or update), if this is possible.

Parameters
generatedKeysRequest:Object

false if generated keys are not needed, true if generated keys should be configured automatically, int[] to specify column indices to return generated keys from, or String[] to specify column names to return generated keys from

Returns:ResultWithGeneratedKeys

the update count and generated keys, if any

Annotations
@Override