- All Implemented Interfaces:
AutoCloseable
,FbStatement
,ExceptionListenable
,FbWireStatement
- Direct Known Subclasses:
V18Statement
- Since:
- 4.0
- Author:
- Mark Rotteveel
-
Field Summary
Fields inherited from class org.firebirdsql.gds.ng.wire.version11.V11Statement
asyncFetchStatus
Fields inherited from class org.firebirdsql.gds.ng.AbstractFbStatement
exceptionListenerDispatcher, statementListenerDispatcher
-
Constructor Summary
ConstructorsConstructorDescriptionV16Statement
(FbWireDatabase database) Creates a new instance of V16Statement for the specified database. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Cancels the server side batch (that is, clear any rows batched on the server).Execute the batch on the server.Creates aBatchParameterBuffer
instance compatible with this protocol version.void
deferredBatchCreate
(FbBatchConfig batchConfig, DeferredResponse<Void> onResponse) Sends batch create with deferred response processing.void
deferredBatchRelease
(DeferredResponse<Void> onResponse) Closes (releases) the batch on the server with deferred response processing.void
deferredBatchSend
(Collection<RowValue> rowValues, DeferredResponse<Void> onResponse) Sends batch data with deferred response processing.protected void
sendBatchCreate
(FbBatchConfig batchConfig) protected void
sendBatchMsg
(XdrOutputStream xdrOut, RowDescriptor parameterDescriptor, Collection<RowValue> rowValues) protected void
sendExecute
(int operation, RowValue parameters) Sends the execute (forop_execute
orop_execute2
) to the database.boolean
Reports whether this statement implementation supports server-side batch updates.Methods inherited from class org.firebirdsql.gds.ng.wire.version13.V13Statement
readSqlData, writeSqlData, writeSqlData
Methods inherited from class org.firebirdsql.gds.ng.wire.version11.V11Statement
asyncFetchRows, completeAsyncFetch, fetchRows, free, prepare, reset
Methods 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, writeColumnData
Methods inherited from class org.firebirdsql.gds.ng.wire.AbstractFbWireStatement
calculateBlr, calculateBlr, close, emptyRowDescriptor, getBlrCalculator, getDatabase, getHandle, getInfo, getSqlInfo, getXdrIn, getXdrOut, isValidTransactionClass, setHandle, withLock, wrapDeferredResponse
Methods inherited from class org.firebirdsql.gds.ng.AbstractFbStatement
addExceptionListener, addStatementListener, addWeakStatementListener, checkFetchSize, checkPrepareAllowed, checkStatementHasOpenCursor, checkStatementValid, checkStatementValid, closeCursor, closeCursor, createExecutionPlanProcessor, createSqlCountProcessor, ensureClosedCursor, fetchScroll, fetchScrollImpl, forceState, getAllowedTimeout, getCursorInfo, getCursorInfo, getCursorInfoImpl, 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, validateParameters
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.firebirdsql.gds.ng.listeners.ExceptionListenable
addExceptionListener, removeExceptionListener
Methods inherited from interface org.firebirdsql.gds.ng.FbStatement
addStatementListener, addWeakStatementListener, clearCursorFlag, close, closeCursor, closeCursor, emptyRowDescriptor, ensureClosedCursor, fetchScroll, getCursorInfo, getCursorInfo, getDatabase, getExecutionPlan, getExplainedExecutionPlan, getHandle, getParameterDescriptor, getRowDescriptor, getSqlCounts, getSqlInfo, getSqlInfo, getState, getTimeout, getTransaction, getType, hasFetched, isCursorFlagSet, removeStatementListener, setCursorFlag, setCursorName, setTimeout, setTransaction, supportsCursorInfo, supportsFetchScroll, unprepare, validateParameters, withLock
-
Constructor Details
-
V16Statement
Creates a new instance of V16Statement for the specified database.- Parameters:
database
- FbWireDatabase implementation
-
-
Method Details
-
sendExecute
Description copied from class:V10Statement
Sends the execute (forop_execute
orop_execute2
) to the database.- Overrides:
sendExecute
in classV10Statement
- Parameters:
operation
- Operation (op_execute
orop_execute2
)parameters
- Parameters- Throws:
IOException
SQLException
-
supportBatchUpdates
public boolean supportBatchUpdates()Description copied from interface:FbStatement
Reports whether this statement implementation supports server-side batch updates.- Returns:
true
server-side batch updates supported,false
if not supported (default implementation returnsfalse
)
-
createBatchParameterBuffer
Description copied from interface:FbStatement
Creates aBatchParameterBuffer
instance compatible with this protocol version.- Returns:
- batch parameter buffer
- Throws:
SQLException
- if this statement is closed, or a database access error occurs, or when the parameter buffer could not be created for other reasonsSQLFeatureNotSupportedException
- when this statement implementation does not support batch updates- See Also:
-
deferredBatchCreate
public void deferredBatchCreate(FbBatchConfig batchConfig, DeferredResponse<Void> onResponse) throws SQLException Description copied from interface:FbStatement
Sends batch create with deferred response processing.Implementations that do not supported deferred or async response processing should call
DeferredResponse.onResponse(Object)
and - optionally -DeferredResponse.onException(Exception)
synchronously. If the response is deferred, but the implementation is not capable of connecting the response back, it should callonResponse
before method return, and any exceptions generated by deferred processing should then be thrown from the method that causes the response to be received.- Parameters:
batchConfig
- batch configurationonResponse
- deferred action to call when response is received- Throws:
SQLException
- for database access errors (I/O errors)SQLFeatureNotSupportedException
- when this statement implementation does not support batch updates- See Also:
-
sendBatchCreate
- Throws:
SQLException
IOException
-
deferredBatchSend
public void deferredBatchSend(Collection<RowValue> rowValues, DeferredResponse<Void> onResponse) throws SQLException Description copied from interface:FbStatement
Sends batch data with deferred response processing.For implementations that do not supported deferred or async response processing, see
FbStatement.deferredBatchCreate(FbBatchConfig, DeferredResponse)
for expected behaviour.- Parameters:
rowValues
- collection of row valuesonResponse
- deferred action to call when response is received- Throws:
SQLException
- for database access errors (I/O errors)SQLFeatureNotSupportedException
- when this statement implementation does not support batch updates- See Also:
-
sendBatchMsg
protected void sendBatchMsg(XdrOutputStream xdrOut, RowDescriptor parameterDescriptor, Collection<RowValue> rowValues) throws SQLException, IOException - Throws:
SQLException
IOException
-
batchExecute
Description copied from interface:FbStatement
Execute the batch on the server.- Returns:
- batch completion response
- Throws:
SQLException
- for database access errorsSQLFeatureNotSupportedException
- when this statement implementation does not support batch updates- See Also:
-
batchCancel
Description copied from interface:FbStatement
Cancels the server side batch (that is, clear any rows batched on the server).- Throws:
SQLException
- for database access errorsSQLFeatureNotSupportedException
- when this statement implementation does not support batch updates- See Also:
-
deferredBatchRelease
Description copied from interface:FbStatement
Closes (releases) the batch on the server with deferred response processing.For implementations that do not supported deferred or async response processing, see
FbStatement.deferredBatchCreate(FbBatchConfig, DeferredResponse)
for expected behaviour.- Parameters:
onResponse
- deferred action to call when response is received- Throws:
SQLException
- for database access errorsSQLFeatureNotSupportedException
- when this statement implementation does not support batch updates- See Also:
-