|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.command.Command
public abstract class Command
Represents a SQL statement. This object is only used on the server side.
| Field Summary | |
|---|---|
protected Session |
session
The session. |
protected long |
startTime
The last start time. |
protected Trace |
trace
The trace module. |
| Constructor Summary | |
|---|---|
Command(Parser parser,
java.lang.String sql)
|
|
| Method Summary | |
|---|---|
void |
cancel()
Cancel the statement if it is still processing. |
void |
checkCanceled()
Check if this command has been canceled, and throw an exception if yes. |
void |
close()
Close the statement. |
ResultInterface |
executeQuery(int maxrows,
boolean scrollable)
Execute the query. |
LocalResult |
executeQueryLocal(int maxrows)
Execute a query and return a local result set. |
int |
executeUpdate()
Execute the statement |
ResultInterface |
getMetaData()
Get an empty result set containing the meta data of the result. |
LocalResult |
getMetaDataLocal()
|
abstract ObjectArray<? extends ParameterInterface> |
getParameters()
Get the list of parameters. |
abstract boolean |
isQuery()
Check if this command is a query. |
abstract boolean |
isReadOnly()
Check if this command is read only. |
abstract boolean |
isTransactional()
Check if this command is transactional. |
LocalResult |
query(int maxrows)
Execute a query statement, if this is possible. |
abstract LocalResult |
queryMeta()
Get an empty result set containing the meta data. |
java.lang.String |
toString()
|
int |
update()
Execute an updating statement, if this is possible. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Session session
protected final Trace trace
protected long startTime
| Constructor Detail |
|---|
public Command(Parser parser,
java.lang.String sql)
| Method Detail |
|---|
public abstract boolean isTransactional()
public abstract boolean isQuery()
isQuery in interface CommandInterfacepublic abstract ObjectArray<? extends ParameterInterface> getParameters()
getParameters in interface CommandInterfacepublic abstract boolean isReadOnly()
public abstract LocalResult queryMeta()
throws java.sql.SQLException
java.sql.SQLException
public int update()
throws java.sql.SQLException
java.sql.SQLException - if the command is not an updating statement
public LocalResult query(int maxrows)
throws java.sql.SQLException
maxrows - the maximum number of rows returned
java.sql.SQLException - if the command is not a query
public final LocalResult getMetaDataLocal()
throws java.sql.SQLException
java.sql.SQLException
public final ResultInterface getMetaData()
throws java.sql.SQLException
CommandInterface
getMetaData in interface CommandInterfacejava.sql.SQLException
public ResultInterface executeQuery(int maxrows,
boolean scrollable)
throws java.sql.SQLException
CommandInterface
executeQuery in interface CommandInterfacemaxrows - the maximum number of rows returnedscrollable - if the result set must be scrollable
java.sql.SQLException
public LocalResult executeQueryLocal(int maxrows)
throws java.sql.SQLException
query(int) finally.
maxrows - the maximum number of rows to return
java.sql.SQLException
public void checkCanceled()
throws java.sql.SQLException
java.sql.SQLException - if the statement has been canceled
public int executeUpdate()
throws java.sql.SQLException
CommandInterface
executeUpdate in interface CommandInterfacejava.sql.SQLExceptionpublic void close()
CommandInterface
close in interface CommandInterfacepublic void cancel()
CommandInterface
cancel in interface CommandInterfacepublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||