- All Implemented Interfaces:
AutoCloseable,FbStatement,ExceptionListenable,FbWireStatement
- Since:
- 5
- Author:
- Mark Rotteveel
-
Field Summary
Fields inherited from class org.firebirdsql.gds.ng.wire.version11.V11Statement
asyncFetchStatusFields inherited from class org.firebirdsql.gds.ng.AbstractFbStatement
exceptionListenerDispatcher, statementListenerDispatcher -
Constructor Summary
ConstructorsConstructorDescriptionV18Statement(FbWireDatabase database) Creates a new instance of V18Statement for the specified database. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclearCursorFlag(CursorFlag flag) Clears cursor flag.protected voidfetchScrollImpl(FetchType fetchType, int fetchSize, int position) Implementation ofAbstractFbStatement.fetchScroll(FetchType, int, int).protected final intprotected byte[]getCursorInfoImpl(byte[] requestItems, int bufferLength) Implementation ofAbstractFbStatement.getCursorInfo(byte[], int).final booleanisCursorFlagSet(CursorFlag flag) Reports whether a cursor flag is set.protected voidsendExecute(int operation, RowValue parameters) Sends the execute (forop_executeorop_execute2) to the database.protected voidsendFetchScroll(FetchType fetchType, int fetchSize, int position) final voidsetCursorFlag(CursorFlag flag) Set cursor flag.booleanReports whether this statement implementation supportsFbStatement.getCursorInfo(byte[], int, InfoProcessor)andFbStatement.getCursorInfo(byte[], int).booleanReports whether this statement implementation supportsFbStatement.fetchScroll(FetchType, int, int)with anything other thanFetchType.NEXT.Methods inherited from class org.firebirdsql.gds.ng.wire.version16.V16Statement
batchCancel, batchExecute, createBatchParameterBuffer, deferredBatchCreate, deferredBatchRelease, deferredBatchSend, sendBatchCreate, sendBatchMsg, supportBatchUpdatesMethods inherited from class org.firebirdsql.gds.ng.wire.version13.V13Statement
readSqlData, writeSqlData, writeSqlDataMethods inherited from class org.firebirdsql.gds.ng.wire.version11.V11Statement
asyncFetchRows, completeAsyncFetch, fetchRows, free, prepare, resetMethods inherited from class org.firebirdsql.gds.ng.wire.version10.V10Statement
doFreePacket, execute, getDefaultSqlInfoSize, getMaxSqlInfoSize, processAllocateResponse, processExecuteResponse, processExecuteSingletonResponse, processFetchResponse, processFetchResponse, processFreeResponse, processPrepareResponse, readColumnData, sendAllocate, sendFetch, sendFree, sendPrepare, setCursorNameImpl, writeColumnDataMethods inherited from class org.firebirdsql.gds.ng.wire.AbstractFbWireStatement
calculateBlr, calculateBlr, close, emptyRowDescriptor, getBlrCalculator, getDatabase, getHandle, getInfo, getSqlInfo, getXdrIn, getXdrOut, isValidTransactionClass, setHandle, withLock, wrapDeferredResponseMethods inherited from class org.firebirdsql.gds.ng.AbstractFbStatement
addExceptionListener, addStatementListener, addWeakStatementListener, checkFetchSize, checkPrepareAllowed, checkStatementHasOpenCursor, checkStatementValid, checkStatementValid, closeCursor, closeCursor, createExecutionPlanProcessor, createSqlCountProcessor, ensureClosedCursor, fetchScroll, forceState, getAllowedTimeout, getCursorInfo, getCursorInfo, getCursorName, getExecutionPlan, getExplainedExecutionPlan, getParameterDescriptionInfoRequestItems, getParameterDescriptor, getRowDescriptor, getSqlCounts, getSqlInfo, getState, getStatementInfoRequestItems, getStatementWarningCallback, getTimeout, getTransaction, getTransactionListener, getType, hasFetched, hasFields, hasSingletonResult, isAfterLast, isBeforeFirst, isPrepareAllowed, parseStatementInfo, queueRowData, removeExceptionListener, removeStatementListener, reset, resetAll, setAfterLast, setBeforeFirst, setCursorName, setParameterDescriptor, setRowDescriptor, setTimeout, setTransaction, setType, signalAsyncFetchComplete, signalAsyncFetchStart, signalExecute, signalFetch, switchState, unprepare, validateParametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.firebirdsql.gds.ng.listeners.ExceptionListenable
addExceptionListener, removeExceptionListenerMethods inherited from interface org.firebirdsql.gds.ng.FbStatement
addStatementListener, addWeakStatementListener, close, closeCursor, closeCursor, emptyRowDescriptor, ensureClosedCursor, fetchScroll, getCursorInfo, getCursorInfo, getDatabase, getExecutionPlan, getExplainedExecutionPlan, getHandle, getParameterDescriptor, getRowDescriptor, getSqlCounts, getSqlInfo, getSqlInfo, getState, getTimeout, getTransaction, getType, hasFetched, removeStatementListener, setCursorName, setTimeout, setTransaction, unprepare, validateParameters, withLock
-
Constructor Details
-
V18Statement
Creates a new instance of V18Statement for the specified database.- Parameters:
database- FbWireDatabase implementation
-
-
Method Details
-
sendExecute
Description copied from class:V10StatementSends the execute (forop_executeorop_execute2) to the database.- Overrides:
sendExecutein classV16Statement- Parameters:
operation- Operation (op_executeorop_execute2)parameters- Parameters- Throws:
IOExceptionSQLException
-
fetchScrollImpl
protected void fetchScrollImpl(FetchType fetchType, int fetchSize, int position) throws SQLException Description copied from class:AbstractFbStatementImplementation ofAbstractFbStatement.fetchScroll(FetchType, int, int).An implementation should not notify
exceptionListenerDispatcher, as that is already handled inAbstractFbStatement.fetchScroll(FetchType, int, int).The implementation of
AbstractFbStatement.fetchScroll(FetchType, int, int)redirectsFetchType.NEXTtoFbStatement.fetchRows(int). The implementation does need to handleNEXT, but only when actually implementing the other scroll direction.- Overrides:
fetchScrollImplin classAbstractFbStatement- Throws:
SQLFeatureNotSupportedException- If the protocol version or the implementation does not support scroll fetch (even forNEXT)SQLException- For database access errors, when called on a closed statement, when no cursor is open, or for serverside error conditions- See Also:
-
sendFetchScroll
protected void sendFetchScroll(FetchType fetchType, int fetchSize, int position) throws SQLException, IOException - Throws:
SQLExceptionIOException
-
getCursorInfoImpl
Description copied from class:AbstractFbStatementImplementation ofAbstractFbStatement.getCursorInfo(byte[], int).An implementation should not notify
exceptionListenerDispatcher, as that is already handled inAbstractFbStatement.getCursorInfo(byte[], int).- Overrides:
getCursorInfoImplin classAbstractFbStatement- Throws:
SQLException- For errors retrieving or transforming the responseSQLFeatureNotSupportedException- If requesting cursor info is not supported (Firebird 4.0 or earlier, or native implementation)- See Also:
-
supportsFetchScroll
public boolean supportsFetchScroll()Description copied from interface:FbStatementReports whether this statement implementation supportsFbStatement.fetchScroll(FetchType, int, int)with anything other thanFetchType.NEXT.- Returns:
truefetchScrollsupported,falseif not supported (default implementation returnsfalse)
-
supportsCursorInfo
public boolean supportsCursorInfo()Description copied from interface:FbStatementReports whether this statement implementation supportsFbStatement.getCursorInfo(byte[], int, InfoProcessor)andFbStatement.getCursorInfo(byte[], int).- Returns:
truegetCursorInfosupported,falseif not supported (default implementation returnsfalse)
-
getCursorFlagsAsInt
protected final int getCursorFlagsAsInt() -
setCursorFlag
Description copied from interface:FbStatementSet cursor flag.If a protocol version does not support cursor flags, this is silently ignored.
- Parameters:
flag- Cursor flag to set
-
clearCursorFlag
Description copied from interface:FbStatementClears cursor flag.Setting a cursor flag only affects subsequent executes. A currently open cursor will not be affected.
If a protocol version does not support cursor flags, this is silently ignored.
- Parameters:
flag- Cursor flag to clear
-
isCursorFlagSet
Description copied from interface:FbStatementReports whether a cursor flag is set.If a protocol version does not support cursor flags,
falseshould be returned.- Parameters:
flag- Cursor flag- Returns:
truewhen set,falseotherwise
-