Top Description Fields Constructors Methods
org.hsqldb.jdbc

pack-priv Class JDBCStatementBase

extends Object
Class Inheritance
Known Direct Subclasses
org.hsqldb.jdbc.JDBCPreparedStatement, org.hsqldb.jdbc.JDBCStatement
Imports
java.sql.ResultSet, .SQLException, .SQLWarning, org.hsqldb.StatementTypes, org.hsqldb.error.ErrorCode, org.hsqldb.result.Result, .ResultConstants

Base class for HSQLDB's implementations of java.sql.Statement and java.sql.PreparedStatement. Contains common members and methods.
Author
fredt@usrs
Since
HSQLDB 1.9.0
Version
2.4.0

Field Summary

Modifier and TypeField and Description
protected Result
batchResultOut

Used by this statement to communicate batched execution requests

pack-priv static final int
pack-priv static final int
CLOSE_CURRENT_RESULT

JDBC 3 constants

protected JDBCConnection
connection

The connection used to execute this statement.

pack-priv int
connectionIncarnation

connection generation

protected JDBCResultSet
currentResultSet

The currently existing ResultSet object

protected Result
errorResult

Any error returned from a batch execute.

pack-priv static final int
protected int
fetchDirection

Direction of results fetched.

protected int
fetchSize

The number of rows returned in a chunk.

protected Result
generatedResult

The currently existing generated key Result

protected JDBCResultSet
generatedResultSet

The currently existing ResultSet object for generated keys

pack-priv volatile boolean
isClosed

Whether this Statement has been explicitly closed.

protected boolean
isEscapeProcessing

Is escape processing enabled?

pack-priv static final int
protected int
maxRows

The maximum number of rows to generate when executing this statement.

pack-priv static final int
protected int
queryTimeout

Query timeout in seconds

protected Result
resultIn

The result of executing this statement.

protected Result
resultOut

Used by this statement to communicate non-batched requests.

pack-priv static final int
protected SQLWarning
rootWarning

The first warning in the chain.

protected int
rsProperties

The combined result set properties obtained by executing this statement.

pack-priv static final int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
checkClosed()

An internal check for closed statements.

pack-priv void
close()

Implementation in subclasses

public void
closeOnCompletion()

Specifies that this Statement will be closed when all its dependent result sets are closed.

pack-priv void
closeResultData()

See comment for getMoreResults.

pack-priv ResultSet
pack-priv boolean
pack-priv boolean
getMoreResults(int current)

Not yet correct for multiple ResultSets.

pack-priv ResultSet
pack-priv int
public boolean

Returns:

true if the Statement will be closed when all of its dependent result sets are closed; false otherwise
isCloseOnCompletion
()

Returns a value indicating whether this Statement will be closed when all its dependent result sets are closed.

pack-priv void
performPostExecute()

processes chained warnings and any generated columns result set

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

batchResultOutback to summary
protected Result batchResultOut

Used by this statement to communicate batched execution requests

CLOSE_ALL_RESULTSback to summary
pack-priv static final int CLOSE_ALL_RESULTS
CLOSE_CURRENT_RESULTback to summary
pack-priv static final int CLOSE_CURRENT_RESULT

JDBC 3 constants

connectionback to summary
protected JDBCConnection connection

The connection used to execute this statement.

connectionIncarnationback to summary
pack-priv int connectionIncarnation

connection generation

currentResultSetback to summary
protected JDBCResultSet currentResultSet

The currently existing ResultSet object

errorResultback to summary
protected Result errorResult

Any error returned from a batch execute.

EXECUTE_FAILEDback to summary
pack-priv static final int EXECUTE_FAILED
fetchDirectionback to summary
protected int fetchDirection

Direction of results fetched.

fetchSizeback to summary
protected int fetchSize

The number of rows returned in a chunk.

generatedResultback to summary
protected Result generatedResult

The currently existing generated key Result

generatedResultSetback to summary
protected JDBCResultSet generatedResultSet

The currently existing ResultSet object for generated keys

isClosedback to summary
pack-priv volatile boolean isClosed

Whether this Statement has been explicitly closed. A JDBCConnection object now explicitly closes all of its open JDBC Statement objects when it is closed.

isEscapeProcessingback to summary
protected boolean isEscapeProcessing

Is escape processing enabled?

KEEP_CURRENT_RESULTback to summary
pack-priv static final int KEEP_CURRENT_RESULT
maxRowsback to summary
protected int maxRows

The maximum number of rows to generate when executing this statement.

NO_GENERATED_KEYSback to summary
pack-priv static final int NO_GENERATED_KEYS
queryTimeoutback to summary
protected int queryTimeout

Query timeout in seconds

resultInback to summary
protected Result resultIn

The result of executing this statement.

resultOutback to summary
protected Result resultOut

Used by this statement to communicate non-batched requests.

RETURN_GENERATED_KEYSback to summary
pack-priv static final int RETURN_GENERATED_KEYS
rootWarningback to summary
protected SQLWarning rootWarning

The first warning in the chain. Null if there are no warnings.

rsPropertiesback to summary
protected int rsProperties

The combined result set properties obtained by executing this statement.

SUCCESS_NO_INFOback to summary
pack-priv static final int SUCCESS_NO_INFO

Constructor Detail

JDBCStatementBaseback to summary
pack-priv JDBCStatementBase()

Method Detail

checkClosedback to summary
pack-priv void checkClosed() throws SQLException

An internal check for closed statements.

Exceptions
SQLException:
when the connection is closed
closeback to summary
pack-priv void close() throws SQLException

Implementation in subclasses

Exceptions
SQLException:
on access error
closeOnCompletionback to summary
public void closeOnCompletion() throws SQLException

Specifies that this Statement will be closed when all its dependent result sets are closed. If execution of the Statement does not produce any result sets, this method has no effect.

Note

Multiple calls to closeOnCompletion do not toggle the effect on this Statement. However, a call to closeOnCompletion does effect both the subsequent execution of statements, and statements that currently have open, dependent, result sets.

Exceptions
SQLException:
if this method is called on a closed Statement
Since
JDK 1.7, HSQLDB 2.0.1
closeResultDataback to summary
pack-priv void closeResultData() throws SQLException

See comment for getMoreResults.

getGeneratedResultSetback to summary
pack-priv ResultSet getGeneratedResultSet() throws SQLException
getMoreResultsback to summary
pack-priv boolean getMoreResults() throws SQLException
getMoreResultsback to summary
pack-priv boolean getMoreResults(int current) throws SQLException

Not yet correct for multiple ResultSets. Should keep track of all previous ResultSet objects to be able to close them

getResultSetback to summary
pack-priv ResultSet getResultSet() throws SQLException
getUpdateCountback to summary
pack-priv int getUpdateCount() throws SQLException
isCloseOnCompletionback to summary
public boolean isCloseOnCompletion() throws SQLException

Returns a value indicating whether this Statement will be closed when all its dependent result sets are closed.

Returns:boolean

true if the Statement will be closed when all of its dependent result sets are closed; false otherwise

Exceptions
SQLException:
if this method is called on a closed Statement
Since
JDK 1.7, HSQLDB 2.0.1
performPostExecuteback to summary
pack-priv void performPostExecute() throws SQLException

processes chained warnings and any generated columns result set