- All Implemented Interfaces:
AutoCloseable,Statement,Wrapper,FirebirdStatement
- Direct Known Subclasses:
FBStatement
This class is internal API of Jaybird. Future versions may radically change, move, or make inaccessible this type.
For the public API, refer to the Statement and FirebirdStatement interfaces.
- Since:
- 6
- Author:
- Mark Rotteveel
-
Field Summary
FieldsFields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractStatement(FBConnection connection, ResultSetBehavior resultSetBehavior) -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddWarning(SQLWarning warning) protected final voidCheck if this statement is valid (not closed).final voidvoidclose()final voidfinal voidCompletes this statement withCompletionReason.OTHER.abstract voidcompleteStatement(CompletionReason reason) Completes this statement withreason.final booleanprotected final FetchConfigfinal FBConnectionprotected final @Nullable Stringfinal intfinal intfinal longfinal intThe local statement id is intended to identify the statement for internal implementation purposes.final intfinal intfinal intfinal intprotected abstract FbStatementabstract intGet the current statement type of this statement.final @Nullable SQLWarningfinal inthashCode()final booleanisClosed()final booleanfinal booleanbooleanisValid()Check if this statement is valid.protected final voidCloses this statement ifcloseOnCompletionis set totrue, does nothing if set tofalse.protected final ResultSetBehaviorfinal voidsetCursorName(@Nullable String cursorName) final voidsetFetchDirection(int direction) final voidsetFetchSize(int rows) final voidsetLargeMaxRows(long max) final voidsetMaxRows(int max) final voidsetPoolable(boolean poolable) protected final LockCloseablewithLock()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.firebirdsql.jdbc.FirebirdStatement
getCurrentResultSet, getDeletedRowsCount, getExecutionPlan, getExplainedExecutionPlan, getInsertedRowsCount, getLastExecutionPlan, getLastExplainedExecutionPlan, getUpdatedRowsCount, hasOpenResultSetMethods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getGeneratedKeys, getLargeUpdateCount, getMaxFieldSize, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getUpdateCount, isSimpleIdentifier, setEscapeProcessing, setMaxFieldSize, setQueryTimeoutMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Field Details
-
connection
-
-
Constructor Details
-
AbstractStatement
-
-
Method Details
-
getConnection
- Specified by:
getConnectionin interfaceStatement- Throws:
SQLException
-
getStatementHandle
- Returns:
- instance of
FbStatementassociated with this statement; cannot benull - Throws:
SQLException- if this statement is closedSQLFeatureNotSupportedException- if this statement implementation does not use statement handles
-
getStatementType
public abstract int getStatementType()Get the current statement type of this statement.The returned value is one of the
TYPE_*constant values defined inFirebirdPreparedStatement, or0if the statement currently does not have a statement type.- Returns:
- The identifier for the given statement's type
-
close
Subclasses overriding this method are expected to call this method with
super.close()at an appropriate point to mark it closed.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceStatement- Throws:
SQLException
-
isClosed
public final boolean isClosed() -
isValid
public boolean isValid()Description copied from interface:FirebirdStatementCheck if this statement is valid.- Specified by:
isValidin interfaceFirebirdStatement- Returns:
trueif statement is valid and can be used to execute SQL.
-
checkValidity
Check if this statement is valid (not closed). This method should be invoked before executing any action which requires a valid/open statement.- Throws:
SQLException- if this Statement has been closed and cannot be used anymore.
-
completeStatement
Completes this statement withCompletionReason.OTHER.- Throws:
SQLException- for failures completing this statement- See Also:
-
completeStatement
Completes this statement withreason.On completion, any open result set will be closed, and possibly the statement itself may be closed.
- Parameters:
reason- completion reason- Throws:
SQLException- for failures completing this statement
-
isPoolable
- Specified by:
isPoolablein interfaceStatement- Throws:
SQLException
-
setPoolable
- Specified by:
setPoolablein interfaceStatement- Throws:
SQLException
-
isCloseOnCompletion
- Specified by:
isCloseOnCompletionin interfaceStatement- Throws:
SQLException
-
closeOnCompletion
- Specified by:
closeOnCompletionin interfaceStatement- Throws:
SQLException
-
performCloseOnCompletion
Closes this statement ifcloseOnCompletionis set totrue, does nothing if set tofalse.- Throws:
SQLException- for errors closing this statement- See Also:
-
fetchConfig
- Returns:
- current fetch config for this statement
- Since:
- 6
-
resultSetBehavior
- Returns:
- result set behavior for this statement
- Since:
- 6
-
getResultSetType
- Specified by:
getResultSetTypein interfaceStatement- Throws:
SQLException
-
getResultSetConcurrency
- Specified by:
getResultSetConcurrencyin interfaceStatement- Throws:
SQLException
-
getResultSetHoldability
- Specified by:
getResultSetHoldabilityin interfaceStatement- Throws:
SQLException
-
getMaxRows
- Specified by:
getMaxRowsin interfaceStatement- Throws:
SQLException
-
setMaxRows
- Specified by:
setMaxRowsin interfaceStatement- Throws:
SQLException
-
setLargeMaxRows
Jaybird does not support maxRows exceeding
Integer.MAX_VALUE, if a larger value is set, Jaybird will add a warning to the statement and reset the maximum to 0.- Specified by:
setLargeMaxRowsin interfaceStatement- Throws:
SQLException
-
getLargeMaxRows
Jaybird does not support maxRows exceeding
Integer.MAX_VALUE, the return value of this method is the same asgetMaxRows().- Specified by:
getLargeMaxRowsin interfaceStatement- Throws:
SQLException
-
getFetchSize
- Specified by:
getFetchSizein interfaceStatement- Throws:
SQLException
-
setFetchSize
- Specified by:
setFetchSizein interfaceStatement- Throws:
SQLException
-
getFetchDirection
- Specified by:
getFetchDirectionin interfaceStatement- Throws:
SQLException
-
setFetchDirection
- Specified by:
setFetchDirectionin interfaceStatement- Throws:
SQLException
-
setCursorName
- Specified by:
setCursorNamein interfaceStatement- Throws:
SQLException
-
getCursorName
- Returns:
- current value of
cursorName - See Also:
-
getWarnings
If connection property
reportSQLWarningsis set toNONE(case-insensitive), this method will not report warnings and always returnnull.- Specified by:
getWarningsin interfaceStatement- Throws:
SQLException
-
clearWarnings
- Specified by:
clearWarningsin interfaceStatement- Throws:
SQLException
-
addWarning
-
getLocalStatementId
public final int getLocalStatementId()Description copied from interface:FirebirdStatementThe 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.
- Specified by:
getLocalStatementIdin interfaceFirebirdStatement- Returns:
- The local statement id.
-
hashCode
public final int hashCode() -
equals
-
withLock
- See Also:
-