public class V10Statement extends AbstractFbWireStatement implements FbWireStatement
FbWireStatement implementation for the version 10 wire protocol.exceptionListenerDispatcher, statementListenerDispatcher| Constructor and Description | 
|---|
| V10Statement(FbWireDatabase database)Creates a new instance of V10Statement for the specified database. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | doFreePacket(int option)Handles sending the free statement packet and associated state changes on this statement | 
| void | execute(RowValue parameters)Execute the statement. | 
| void | fetchRows(int fetchSize)Requests this statement to fetch the next  fetchSizerows. | 
| protected void | free(int option)Frees the currently allocated statement. | 
| int | getDefaultSqlInfoSize() | 
| int | getMaxSqlInfoSize() | 
| void | prepare(java.lang.String statementText)Prepare the statement text. | 
| protected void | processAllocateResponse(GenericResponse response)Processes the allocate response from the server. | 
| protected void | processExecuteResponse(GenericResponse genericResponse)Process the execute response. | 
| protected void | processExecuteSingletonResponse(SqlResponse sqlResponse)Process the execute response for statements with a singleton response ( op_execute2; stored
 procedures). | 
| protected void | processFetchResponse(FetchDirection direction)Process the fetch response by reading the returned rows and queuing them. | 
| protected void | processFreeResponse(Response response)Processes the response to the free statement. | 
| protected void | processPrepareResponse(GenericResponse genericResponse)Processes the prepare response from the server. | 
| protected byte[] | readColumnData(XdrInputStream xdrIn,
              int len) | 
| protected RowValue | readSqlData()Reads a single row from the database. | 
| protected void | sendAllocate()Sends the allocate request to the server. | 
| protected void | sendExecute(int operation,
           RowValue parameters)Sends the execute (for  op_executeorop_execute2) to the database. | 
| protected void | sendFetch(int fetchSize)Sends the fetch request to the database. | 
| protected void | sendFree(int option)Sends the free statement to the database | 
| protected void | sendPrepare(java.lang.String statementText)Sends the statement prepare to the connection. | 
| void | setCursorName(java.lang.String cursorName)Sets the named cursor name for this statement. | 
| protected void | writeColumnData(XdrOutputStream xdrOut,
               int len,
               byte[] buffer,
               FieldDescriptor fieldDescriptor) | 
| protected void | writeSqlData(RowDescriptor rowDescriptor,
            RowValue fieldValues,
            boolean useActualLength)Write a set of SQL data from a  RowValue. | 
calculateBlr, calculateBlr, close, emptyRowDescriptor, getBlrCalculator, getDatabase, getHandle, getInfo, getSqlInfo, getXdrIn, getXdrOut, isValidTransactionClass, setHandle, withLock, wrapDeferredResponseaddExceptionListener, addStatementListener, checkStatementValid, checkStatementValid, closeCursor, closeCursor, createExecutionPlanProcessor, createSqlCountProcessor, ensureClosedCursor, fetchScroll, fetchScrollImpl, finalize, forceState, getAllowedTimeout, getCursorInfo, getCursorInfo, getCursorInfoImpl, 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, reset, resetAll, setAfterLast, setBeforeFirst, setParameterDescriptor, setRowDescriptor, setTimeout, setTransaction, setType, signalExecute, signalFetch, switchState, unprepare, validateParametersclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddStatementListener, batchCancel, batchExecute, clearCursorFlag, close, closeCursor, closeCursor, createBatchParameterBuffer, deferredBatchCreate, deferredBatchRelease, deferredBatchSend, emptyRowDescriptor, ensureClosedCursor, fetchScroll, getCursorInfo, getCursorInfo, getDatabase, getExecutionPlan, getExplainedExecutionPlan, getHandle, getParameterDescriptor, getRowDescriptor, getSqlCounts, getSqlInfo, getSqlInfo, getState, getTimeout, getTransaction, getType, hasFetched, isCursorFlagSet, removeStatementListener, setCursorFlag, setTimeout, setTransaction, supportBatchUpdates, supportsCursorInfo, supportsFetchScroll, unprepare, validateParameters, withLockaddExceptionListener, removeExceptionListenerpublic V10Statement(FbWireDatabase database)
database - FbWireDatabase implementationprotected void free(int option)
             throws java.sql.SQLException
AbstractFbStatementISCConstants.DSQL_close or drop
 the statement handle using ISCConstants.DSQL_drop.free in class AbstractFbStatementoption - Free optionjava.sql.SQLExceptionprotected void doFreePacket(int option)
                     throws java.sql.SQLException,
                            java.io.IOException
option - free statement optionjava.sql.SQLExceptionjava.io.IOExceptionprotected void sendFree(int option)
                 throws java.io.IOException,
                        java.sql.SQLException
option - Free statement optionjava.io.IOExceptionjava.sql.SQLExceptionprotected void processFreeResponse(Response response)
response - Response objectpublic void prepare(java.lang.String statementText)
             throws java.sql.SQLException
FbStatement
 If this handle is in state StatementState.NEW then it will first allocate the statement.
 
prepare in interface FbStatementstatementText - Statement textjava.sql.SQLException - If a database access error occurs, or this statement is currently executing a query.protected void sendPrepare(java.lang.String statementText)
                    throws java.sql.SQLException,
                           java.io.IOException
statementText - Statementjava.sql.SQLExceptionjava.io.IOExceptionprotected void processPrepareResponse(GenericResponse genericResponse) throws java.sql.SQLException
genericResponse - GenericResponsejava.sql.SQLExceptionpublic void setCursorName(java.lang.String cursorName)
                   throws java.sql.SQLException
FbStatementsetCursorName in interface FbStatementcursorName - Name of the cursorjava.sql.SQLException - If this statement is closed, TODO: Other reasons (eg cursor open)?public void execute(RowValue parameters) throws java.sql.SQLException
FbStatementexecute in interface FbStatementparameters - The list of parameter values to use for execution.java.sql.SQLException - When the number of type of parameters does not match the types returned by FbStatement.getParameterDescriptor(),
         a parameter value was not set, or when an error occurred executing this statement.protected void sendExecute(int operation,
                           RowValue parameters)
                    throws java.io.IOException,
                           java.sql.SQLException
op_execute or op_execute2) to the database.operation - Operation (op_execute or op_execute2)parameters - Parametersjava.io.IOExceptionjava.sql.SQLExceptionprotected void processExecuteSingletonResponse(SqlResponse sqlResponse) throws java.sql.SQLException, java.io.IOException
op_execute2; stored
 procedures).sqlResponse - SQL response objectjava.sql.SQLExceptionjava.io.IOExceptionprotected void processExecuteResponse(GenericResponse genericResponse)
genericResponse - Generic response objectpublic void fetchRows(int fetchSize)
               throws java.sql.SQLException
FbStatementfetchSize rows.
 
 Fetched rows are not returned from this method, but sent to the registered StatementListener instances.
 
fetchRows in interface FbStatementfetchSize - Number of rows to fetch (must be greater than 0)java.sql.SQLException - For database access errors, when called on a closed statement, when no cursor is open or when the fetch
         size is not greater than 0.protected void processFetchResponse(FetchDirection direction) throws java.io.IOException, java.sql.SQLException
direction - fetch directionjava.io.IOExceptionjava.sql.SQLExceptionprotected void sendFetch(int fetchSize)
                  throws java.sql.SQLException,
                         java.io.IOException
fetchSize - Number of rows to fetch.java.sql.SQLExceptionjava.io.IOExceptionprotected RowValue readSqlData() throws java.sql.SQLException, java.io.IOException
RowValuejava.sql.SQLExceptionjava.io.IOExceptionprotected byte[] readColumnData(XdrInputStream xdrIn, int len) throws java.io.IOException
java.io.IOExceptionprotected void writeSqlData(RowDescriptor rowDescriptor, RowValue fieldValues, boolean useActualLength) throws java.io.IOException, java.sql.SQLException
RowValue.rowDescriptor - The row descriptorfieldValues - The List containing the SQL data to be writtenuseActualLength - Should actual field length be used (applies to CHAR)java.io.IOException - if an error occurs while writing to the underlying output streamjava.sql.SQLExceptionprotected void writeColumnData(XdrOutputStream xdrOut, int len, byte[] buffer, FieldDescriptor fieldDescriptor) throws java.io.IOException
java.io.IOExceptionprotected void sendAllocate()
                     throws java.sql.SQLException,
                            java.io.IOException
java.sql.SQLExceptionjava.io.IOExceptionprotected void processAllocateResponse(GenericResponse response) throws java.sql.SQLException
response - GenericResponsejava.sql.SQLExceptionpublic int getDefaultSqlInfoSize()
getDefaultSqlInfoSize in interface FbStatementpublic int getMaxSqlInfoSize()
getMaxSqlInfoSize in interface FbStatementCopyright © 2001-2024 Jaybird (Firebird JDBC) team. All rights reserved.