org.h2.command
Interface CommandInterface

All Known Implementing Classes:
Command, CommandContainer, CommandList, CommandRemote

public interface CommandInterface

Represents a SQL statement.


Method Summary
 void cancel()
          Cancel the statement if it is still processing.
 void close()
          Close the statement.
 ResultInterface executeQuery(int maxRows, boolean scrollable)
          Execute the query.
 int executeUpdate()
          Execute the statement
 ResultInterface getMetaData()
          Get an empty result set containing the meta data of the result.
 ObjectArray<? extends ParameterInterface> getParameters()
          Get the parameters (if any).
 boolean isQuery()
          Check if this is a query.
 

Method Detail

isQuery

boolean isQuery()
Check if this is a query.

Returns:
true if it is a query

getParameters

ObjectArray<? extends ParameterInterface> getParameters()
Get the parameters (if any).

Returns:
the parameters

executeQuery

ResultInterface executeQuery(int maxRows,
                             boolean scrollable)
                             throws java.sql.SQLException
Execute the query.

Parameters:
maxRows - the maximum number of rows returned
scrollable - if the result set must be scrollable
Returns:
the result
Throws:
java.sql.SQLException

executeUpdate

int executeUpdate()
                  throws java.sql.SQLException
Execute the statement

Returns:
the update count
Throws:
java.sql.SQLException

close

void close()
Close the statement.


cancel

void cancel()
Cancel the statement if it is still processing.


getMetaData

ResultInterface getMetaData()
                            throws java.sql.SQLException
Get an empty result set containing the meta data of the result.

Returns:
the empty result
Throws:
java.sql.SQLException