Package org.firebirdsql.jdbc
Interface FirebirdStatement
-
- All Superinterfaces:
java.lang.AutoCloseable,java.sql.Statement,java.sql.Wrapper
- All Known Subinterfaces:
FirebirdCallableStatement,FirebirdPreparedStatement
- All Known Implementing Classes:
FBCallableStatement,FBPreparedStatement,FBStatement
public interface FirebirdStatement extends java.sql.StatementFirebird-specific extensions to theStatementinterface.- Author:
- Roman Rokytskyy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.sql.ResultSetgetCurrentResultSet()Deprecated.UseStatement.getResultSet()instead, will be removed in Jaybird 7intgetDeletedRowsCount()Get number of deleted rows.intgetInsertedRowsCount()Get number of inserted rows.java.lang.StringgetLastExecutionPlan()Get execution plan for the last executed statement.java.lang.StringgetLastExplainedExecutionPlan()Get detailed execution plan for the last executed statement.intgetLocalStatementId()The local statement id is intended to identify the statement for internal implementation purposes.intgetUpdatedRowsCount()Get number of updated rows.booleanhasOpenResultSet()Check if this statement has open result set.booleanisValid()Check if this statement is valid.-
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
-
-
-
-
Method Detail
-
getInsertedRowsCount
int getInsertedRowsCount() throws java.sql.SQLExceptionGet number of inserted rows. You can call this method multiple times, it does not affect the JDBC result number.- Returns:
- number of inserted rows or -1 if current result is result set.
- Throws:
java.sql.SQLException- if database error occurs.
-
getUpdatedRowsCount
int getUpdatedRowsCount() throws java.sql.SQLExceptionGet number of updated rows. You can call this method multiple times, it does not affect the JDBC result number.- Returns:
- number of updated rows or -1 if current result is result set.
- Throws:
java.sql.SQLException- if database error occurs.
-
getDeletedRowsCount
int getDeletedRowsCount() throws java.sql.SQLExceptionGet number of deleted rows. You can call this method multiple times, it does not affect the JDBC result number.- Returns:
- number of deleted rows or -1 if current result is result set.
- Throws:
java.sql.SQLException- if database error occurs.
-
hasOpenResultSet
boolean hasOpenResultSet()
Check if this statement has open result set. Note, this method works correctly if auto-commit is disabled. In auto-commit mode it will always returnfalsebecause from the statement's point of view result set is not open (in auto-commit mode complete result set is fetched and cached in wrapping object before returning from theStatement.getResultSet()method).- Returns:
trueif there's already open result set associated with this statement, otherwisefalse.
-
getCurrentResultSet
@Deprecated java.sql.ResultSet getCurrentResultSet() throws java.sql.SQLExceptionDeprecated.UseStatement.getResultSet()instead, will be removed in Jaybird 7Get current result set. Behaviour of this method is similar to the behavior of theStatement.getResultSet().- Returns:
- instance of
ResultSetrepresenting current result set ornullif it is not available. - Throws:
java.sql.SQLException- if a database access error happens
-
isValid
boolean isValid()
Check if this statement is valid.- Returns:
trueif statement is valid and can be used to execute SQL.
-
getLastExecutionPlan
java.lang.String getLastExecutionPlan() throws java.sql.SQLExceptionGet execution plan for the last executed statement. Unlike theFirebirdPreparedStatement.getExecutionPlan(), this method can be called only after executing a query or update statement.- Returns:
- execution plan returned by the server.
- Throws:
java.sql.SQLException- if no statement was executed before calling this method, statement is not valid, or there was an error when obtaining the execution plan.
-
getLastExplainedExecutionPlan
java.lang.String getLastExplainedExecutionPlan() throws java.sql.SQLExceptionGet detailed execution plan for the last executed statement. More structured and comprehensible form. Can be called only after executing a query or update statement.- Returns:
- detailed execution plan returned by the server.
- Throws:
java.sql.SQLException- if no statement was executed before calling this method, statement is not valid, or there was an error when obtaining the execution plan.
-
getLocalStatementId
int getLocalStatementId()
The local statement id is intended to identify the statement for internal implementation purposes.NOTE: This method is only included in this interface to try and avoid problems with proxied and bytecode enhanced classes in certain libraries, you should normally have no reason to call this method directly.
The id is expected - but not guaranteed - to be unique for a single connection, and - preferably - for the entire JVM run time as well.
- Returns:
- The local statement id.
-
-