public class V10Statement extends AbstractFbWireStatement implements FbWireStatement
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 (either close the cursor with  ISCConstants.DSQL_closeor drop the statement
 handle usingISCConstants.DSQL_drop. | 
| int | getDefaultSqlInfoSize() | 
| int | getMaxSqlInfoSize() | 
| byte[] | getSqlInfo(byte[] requestItems,
          int bufferLength)Request statement info. | 
| 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()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 byte[] | processInfoSqlResponse(GenericResponse response)Processes the info sql response. | 
| 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 | sendInfoSql(byte[] requestItems,
           int bufferLength)Sends the info sql request 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,
               int fieldType) | 
| protected void | writeSqlData(RowDescriptor rowDescriptor,
            RowValue fieldValues)Write a set of SQL data from a  RowValue. | 
calculateBlr, calculateBlr, close, emptyRowDescriptor, getDatabase, getHandle, getXdrIn, getXdrOut, isValidTransactionClass, setHandleaddExceptionListener, addStatementListener, checkStatementValid, checkStatementValid, closeCursor, closeCursor, createExecutionPlanProcessor, createSqlCountProcessor, ensureClosedCursor, finalize, getAllowedTimeout, getExecutionPlan, getExplainedExecutionPlan, getFieldDescriptor, getParameterDescriptionInfoRequestItems, getParameterDescriptor, getRowDescriptor, getSqlCounts, getSqlInfo, getState, getStatementInfoRequestItems, getStatementWarningCallback, getSynchronizationObject, getTimeout, getTransaction, getTransactionListener, getType, hasFields, hasSingletonResult, isAllRowsFetched, isPrepareAllowed, parseStatementInfo, queueRowData, removeExceptionListener, removeStatementListener, reset, reset, resetAll, setAllRowsFetched, setFieldDescriptor, setParameterDescriptor, setRowDescriptor, setTimeout, setTransaction, setType, signalExecute, signalFetch, switchState, validateParametersclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddStatementListener, close, closeCursor, closeCursor, emptyRowDescriptor, ensureClosedCursor, getDatabase, getExecutionPlan, getExplainedExecutionPlan, getFieldDescriptor, getHandle, getParameterDescriptor, getRowDescriptor, getSqlCounts, getSqlInfo, getState, getTimeout, getTransaction, getType, removeStatementListener, setTimeout, setTransaction, validateParametersaddExceptionListener, removeExceptionListenerpublic V10Statement(FbWireDatabase database)
database - FbWireDatabase implementationpublic byte[] getSqlInfo(byte[] requestItems,
                int bufferLength)
                  throws java.sql.SQLException
FbStatementgetSqlInfo in interface FbStatementrequestItems - Array of info items to requestbufferLength - Response buffer length to usejava.sql.SQLExceptionprotected void sendInfoSql(byte[] requestItems,
               int bufferLength)
                    throws java.io.IOException,
                           java.sql.SQLException
requestItems - Info request itemsbufferLength - Requested response buffer lengthjava.io.IOExceptionjava.sql.SQLExceptionprotected byte[] processInfoSqlResponse(GenericResponse response)
response - GenericResponseprotected 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 > 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 > 0.protected void processFetchResponse()
                             throws java.io.IOException,
                                    java.sql.SQLException
java.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) throws java.io.IOException, java.sql.SQLException
RowValue.rowDescriptor - The row descriptorfieldValues - The List containing the SQL data to be writtenjava.io.IOException - if an error occurs while writing to the underlying output streamjava.sql.SQLExceptionprotected void writeColumnData(XdrOutputStream xdrOut, int len, byte[] buffer, int fieldType) 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-2023 Jaybird (Firebird JDBC/JCA) team. All rights reserved.