## org.h2.command
Class CommandList

    java.lang.Object
      org.h2.command.Command
          org.h2.command.CommandList

All Implemented Interfaces:
  CommandInterface

    public class CommandList

extends Command

Represents a list of SQL statements.

Field Summary

Fields inherited from class org.h2.command.Command
`session, startTime, trace`

Constructor Summary
`CommandList(Parser parser, java.lang.String sql, Command c, java.lang.String remaining)`

Method Summary
`ObjectArray<? extends ParameterInterface>` `getParameters()` Get the list of parameters.
`boolean` `isQuery()` Check if this command is a query.
`boolean` `isReadOnly()` Check if this command is read only.
`boolean` `isTransactional()` Check if this command is transactional.
`LocalResult` `query(int maxrows)` Execute a query statement, if this is possible.
`LocalResult` `queryMeta()` Get an empty result set containing the meta data.
`int` `update()` Execute an updating statement, if this is possible.

Methods inherited from class org.h2.command.Command
`cancel, checkCanceled, close, executeQuery, executeQueryLocal, executeUpdate, getMetaData, getMetaDataLocal, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### CommandList

    public CommandList(Parser parser,
                       java.lang.String sql,
                       Command c,
                       java.lang.String remaining)

Method Detail

### getParameters

    public ObjectArray<? extends ParameterInterface> getParameters()

  Description copied from class: `Command`
  Get the list of parameters.

  Specified by:
    `getParameters` in interface `CommandInterface`
  Specified by:
    `getParameters` in class `Command`
  Returns:
    the list of parameters

### update

    public int update()
               throws java.sql.SQLException

  Description copied from class: `Command`
  Execute an updating statement, if this is possible.

  Overrides:
    `update` in class `Command`
  Returns:
    the update count
  Throws:
    `java.sql.SQLException` - if the command is not an updating statement

### query

    public LocalResult query(int maxrows)
                      throws java.sql.SQLException

  Description copied from class: `Command`
  Execute a query statement, if this is possible.

  Overrides:
    `query` in class `Command`
  Parameters:
    `maxrows` - the maximum number of rows returned
  Returns:
    the local result set
  Throws:
    `java.sql.SQLException` - if the command is not a query

### isQuery

    public boolean isQuery()

  Description copied from class: `Command`
  Check if this command is a query.

  Specified by:
    `isQuery` in interface `CommandInterface`
  Specified by:
    `isQuery` in class `Command`
  Returns:
    true if it is

### isTransactional

    public boolean isTransactional()

  Description copied from class: `Command`
  Check if this command is transactional. If it is not, then it forces the current transaction to commit.

  Specified by:
    `isTransactional` in class `Command`
  Returns:
    true if it is

### isReadOnly

    public boolean isReadOnly()

  Description copied from class: `Command`
  Check if this command is read only.

  Specified by:
    `isReadOnly` in class `Command`
  Returns:
    true if it is

### queryMeta

    public LocalResult queryMeta()
                          throws java.sql.SQLException

  Description copied from class: `Command`
  Get an empty result set containing the meta data.

  Specified by:
    `queryMeta` in class `Command`
  Returns:
    an empty result set
  Throws:
    `java.sql.SQLException`