Class ClientStatement

    • Field Detail

      • fetchedRowBase

        private static long fetchedRowBase
        For use in debugging setLargeMaxRows() method added by JDBC 4.2
      • section_

        private Section section_
      • owner

        private java.sql.Statement owner
        The owner of this statement, if any.
      • updateCount_

        long updateCount_
      • sqlMode_

        protected int sqlMode_
      • sqlUpdateMode_

        int sqlUpdateMode_
      • cachedCursor_

        public Cursor cachedCursor_
      • cachedSingletonRowData_

        public Cursor cachedSingletonRowData_
      • isPreparedStatement_

        boolean isPreparedStatement_
      • cursorName_

        java.lang.String cursorName_
      • openOnClient_

        boolean openOnClient_
      • indexOfCurrentResultSet_

        private int indexOfCurrentResultSet_
      • TIMEOUT_STATEMENT

        protected static final java.lang.String TIMEOUT_STATEMENT
        See Also:
        Constant Field Values
      • timeoutArrayList

        protected java.util.ArrayList<java.lang.String> timeoutArrayList
      • doWriteTimeout

        protected boolean doWriteTimeout
      • timeout_

        int timeout_
      • maxRows_

        long maxRows_
      • maxFieldSize_

        int maxFieldSize_
      • isAutoCommittableStatement_

        boolean isAutoCommittableStatement_
      • isCatalogQuery_

        boolean isCatalogQuery_
      • batch_

        final java.util.ArrayList<java.lang.Object> batch_
      • resultSetType_

        public int resultSetType_
      • resultSetConcurrency_

        public int resultSetConcurrency_
      • resultSetHoldability_

        int resultSetHoldability_
      • fetchSize_

        int fetchSize_
      • fetchDirection_

        int fetchDirection_
      • singletonRowData_

        Cursor singletonRowData_
      • cursorAttributesToSendOnPrepare_

        public java.lang.String cursorAttributesToSendOnPrepare_
      • generatedKeysColumnNames_

        java.lang.String[] generatedKeysColumnNames_
      • generatedKeysColumnIndexes_

        int[] generatedKeysColumnIndexes_
      • autoGeneratedKeys_

        int autoGeneratedKeys_
      • isPoolable

        protected boolean isPoolable
      • closeOnCompletion_

        private boolean closeOnCompletion_
      • closingResultSets_

        private boolean closingResultSets_
      • setSpecialRegisterSection_

        private Section setSpecialRegisterSection_
        This variable keeps track of a Section dediacted to writeSpecialRegister. It gets initialized the first time a Section is needed, and freed when the Statement is closed.
      • INSIDE_BRACKETED_COMMENT

        private static final int INSIDE_BRACKETED_COMMENT
        See Also:
        Constant Field Values
    • Method Detail

      • setFetchedRowBase

        public static void setFetchedRowBase​(long newBase)
        Debug method used to test the setLargeMaxRows() method added by JDBC 4.2. This method is a NOP on a production (insane) build of Derby.
      • getMaterialStatement

        public MaterialStatement getMaterialStatement()
        Returns:
        the materialStatement
      • setMaterialStatement

        public void setMaterialStatement​(MaterialStatement materialStatement)
        Parameters:
        materialStatement - the materialStatement to set
      • resetStatement

        private void resetStatement()
      • initStatement

        private void initStatement()
      • initResetStatement

        private void initResetStatement()
      • initResetPreparedStatement

        protected void initResetPreparedStatement()
      • resetUserControllableAttributes

        private void resetUserControllableAttributes()
        Resets attributes that can be modified by the user through the Statement interface to default values.
      • resetForReuse

        void resetForReuse()
                    throws SqlException
        Resets the statement for reuse in a statement pool.

        Intended to be used only by prepared or callable statements, as Statement objects aren't pooled.

        The following actions are taken:

        • Batches are cleared.
        • Warnings are cleared.
        • Open result set are closed on the client and the server.
        • Cached cursor names are cleared.
        • Statement for fetching auto-generated keys is closed.
        • Special registers are reset.
        • User controllable attributes are reset to defaults, for instance query timeout and max rows to fetch.
        Throws:
        SqlException - if resetting the statement fails
      • resetStatement

        public void resetStatement​(Agent agent,
                                   ClientConnection connection,
                                   int type,
                                   int concurrency,
                                   int holdability,
                                   int autoGeneratedKeys,
                                   java.lang.String[] columnNames,
                                   int[] columnIndexes)
                            throws SqlException
        Throws:
        SqlException
      • initStatement

        private void initStatement​(int type,
                                   int concurrency,
                                   int holdability,
                                   int autoGeneratedKeys,
                                   java.lang.String[] columnNames,
                                   int[] columnIndexes)
                            throws SqlException
        Throws:
        SqlException
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • getSqlWarnings

        protected SqlWarning getSqlWarnings()
      • executeQuery

        public java.sql.ResultSet executeQuery​(java.lang.String sql)
                                        throws java.sql.SQLException
        Specified by:
        executeQuery in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • executeUpdate

        public int executeUpdate​(java.lang.String sql)
                          throws java.sql.SQLException
        Specified by:
        executeUpdate in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • executeLargeUpdate

        public long executeLargeUpdate​(java.lang.String sql)
                                throws java.sql.SQLException
        Specified by:
        executeLargeUpdate in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • isWrapperFor

        public boolean isWrapperFor​(java.lang.Class<?> iface)
                             throws java.sql.SQLException
        Returns false unless iface is implemented
        Specified by:
        isWrapperFor in interface java.sql.Wrapper
        Parameters:
        iface - a Class defining an interface.
        Returns:
        true if this implements the interface or directly or indirectly wraps an object that does.
        Throws:
        java.sql.SQLException - if an error occurs while determining whether this is a wrapper for an object with the given interface.
      • unwrap

        public <T> T unwrap​(java.lang.Class<T> iface)
                     throws java.sql.SQLException
        Returns this if this class implements the specified interface.
        Specified by:
        unwrap in interface java.sql.Wrapper
        Parameters:
        iface - a class defining an interface
        Returns:
        an object that implements the interface
        Throws:
        java.sql.SQLException - if no object is found that implements the interface
      • isClosed

        public boolean isClosed()
                         throws java.sql.SQLException
        Tell whether the statement has been closed or not.
        Specified by:
        isClosed in interface java.sql.Statement
        Returns:
        true if closed, false otherwise.
        Throws:
        java.sql.SQLException - if a database access error occurs (according to spec). Never thrown by this implementation.
      • close

        public void close()
                   throws java.sql.SQLException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • closeX

        void closeX()
             throws SqlException
        An untraced version of close. This method cleans up client-side resources and also sends commands to network server to perform clean up. This should not be called in the finalizer. Difference between finalize and close is that close method does these things additionally (Changes done as part of DERBY-210): 1) Sends commands to the server to close the result sets. 2) Sends commands to the server to close the result sets of the generated keys query. 3) Sends a commit if autocommit is on and it is appropriate. 4) Explicitly removes the statement from connection_.openStatements_ and CommitAndRollbackListeners_ by passing true to markClosed. We may need to do 1) in finalizer too. This is being tracked in DERBY-1021
        Throws:
        SqlException
      • isPoolable

        public boolean isPoolable()
                           throws java.sql.SQLException
        Returns the value of the poolable hint, indicating whether pooling is requested.
        Specified by:
        isPoolable in interface java.sql.Statement
        Returns:
        The value of the poolable hint.
        Throws:
        java.sql.SQLException - if the Statement has been closed.
      • setPoolable

        public void setPoolable​(boolean poolable)
                         throws java.sql.SQLException
        Requests that a Statement be pooled or not.
        Specified by:
        setPoolable in interface java.sql.Statement
        Parameters:
        poolable - requests that the Statement be pooled if true and not be pooled if false.
        Throws:
        java.sql.SQLException - if the Statement has been closed.
      • getMaxFieldSize

        public int getMaxFieldSize()
                            throws java.sql.SQLException
        Specified by:
        getMaxFieldSize in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • setMaxFieldSize

        public void setMaxFieldSize​(int max)
                             throws java.sql.SQLException
        Specified by:
        setMaxFieldSize in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • getMaxRows

        public int getMaxRows()
                       throws java.sql.SQLException
        Specified by:
        getMaxRows in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • getLargeMaxRows

        public long getLargeMaxRows()
                             throws java.sql.SQLException
        Specified by:
        getLargeMaxRows in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • setMaxRows

        public void setMaxRows​(int maxRows)
                        throws java.sql.SQLException
        Specified by:
        setMaxRows in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • setLargeMaxRows

        public void setLargeMaxRows​(long maxRows)
                             throws java.sql.SQLException
        Specified by:
        setLargeMaxRows in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • setEscapeProcessing

        public void setEscapeProcessing​(boolean enable)
                                 throws java.sql.SQLException
        Specified by:
        setEscapeProcessing in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • getQueryTimeout

        public int getQueryTimeout()
                            throws java.sql.SQLException
        Specified by:
        getQueryTimeout in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • setQueryTimeout

        public void setQueryTimeout​(int seconds)
                             throws java.sql.SQLException
        Specified by:
        setQueryTimeout in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • cancel

        public void cancel()
                    throws java.sql.SQLException
        Specified by:
        cancel in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • getWarnings

        public java.sql.SQLWarning getWarnings()
                                        throws java.sql.SQLException
        Specified by:
        getWarnings in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • clearWarnings

        public void clearWarnings()
                           throws java.sql.SQLException
        Specified by:
        clearWarnings in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • clearWarningsX

        final void clearWarningsX()
      • setCursorName

        public void setCursorName​(java.lang.String name)
                           throws java.sql.SQLException
        Specified by:
        setCursorName in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • execute

        public boolean execute​(java.lang.String sql)
                        throws java.sql.SQLException
        Specified by:
        execute in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • getResultSet

        public java.sql.ResultSet getResultSet()
                                        throws java.sql.SQLException
        Specified by:
        getResultSet in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • getUpdateCount

        public int getUpdateCount()
                           throws java.sql.SQLException
        Specified by:
        getUpdateCount in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • getLargeUpdateCount

        public long getLargeUpdateCount()
                                 throws java.sql.SQLException
        Specified by:
        getLargeUpdateCount in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • getMoreResults

        public boolean getMoreResults()
                               throws java.sql.SQLException
        Specified by:
        getMoreResults in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • setFetchDirection

        public void setFetchDirection​(int direction)
                               throws java.sql.SQLException
        Specified by:
        setFetchDirection in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • getFetchDirection

        public int getFetchDirection()
                              throws java.sql.SQLException
        Specified by:
        getFetchDirection in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • setFetchSize

        public void setFetchSize​(int rows)
                          throws java.sql.SQLException
        Specified by:
        setFetchSize in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • getFetchSize

        public int getFetchSize()
                         throws java.sql.SQLException
        Specified by:
        getFetchSize in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • getResultSetConcurrency

        public int getResultSetConcurrency()
                                    throws java.sql.SQLException
        Specified by:
        getResultSetConcurrency in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • getResultSetType

        public int getResultSetType()
                             throws java.sql.SQLException
        Specified by:
        getResultSetType in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • addBatch

        public void addBatch​(java.lang.String sql)
                      throws java.sql.SQLException
        Specified by:
        addBatch in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • clearBatch

        public void clearBatch()
                        throws java.sql.SQLException
        Specified by:
        clearBatch in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • executeBatch

        public int[] executeBatch()
                           throws java.sql.SQLException
        Specified by:
        executeBatch in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • executeLargeBatch

        public long[] executeLargeBatch()
                                 throws java.sql.SQLException
        Specified by:
        executeLargeBatch in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • executeBatchX

        private long[] executeBatchX()
                              throws SqlException,
                                     java.sql.BatchUpdateException
        Throws:
        SqlException
        java.sql.BatchUpdateException
      • getConnection

        public java.sql.Connection getConnection()
                                          throws java.sql.SQLException
        Specified by:
        getConnection in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • getMoreResults

        public boolean getMoreResults​(int current)
                               throws java.sql.SQLException
        Specified by:
        getMoreResults in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • getGeneratedKeys

        public java.sql.ResultSet getGeneratedKeys()
                                            throws java.sql.SQLException
        Specified by:
        getGeneratedKeys in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • executeUpdate

        public int executeUpdate​(java.lang.String sql,
                                 int autoGeneratedKeys)
                          throws java.sql.SQLException
        Specified by:
        executeUpdate in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • executeLargeUpdate

        public long executeLargeUpdate​(java.lang.String sql,
                                       int autoGeneratedKeys)
                                throws java.sql.SQLException
        Specified by:
        executeLargeUpdate in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • executeUpdate

        public int executeUpdate​(java.lang.String sql,
                                 int[] columnIndexes)
                          throws java.sql.SQLException
        Specified by:
        executeUpdate in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • executeLargeUpdate

        public long executeLargeUpdate​(java.lang.String sql,
                                       int[] columnIndexes)
                                throws java.sql.SQLException
        Specified by:
        executeLargeUpdate in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • executeUpdate

        public int executeUpdate​(java.lang.String sql,
                                 java.lang.String[] columnNames)
                          throws java.sql.SQLException
        Specified by:
        executeUpdate in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • executeLargeUpdate

        public long executeLargeUpdate​(java.lang.String sql,
                                       java.lang.String[] columnNames)
                                throws java.sql.SQLException
        Specified by:
        executeLargeUpdate in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • execute

        public boolean execute​(java.lang.String sql,
                               int autoGeneratedKeys)
                        throws java.sql.SQLException
        Specified by:
        execute in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • execute

        public boolean execute​(java.lang.String sql,
                               int[] columnIndexes)
                        throws java.sql.SQLException
        Specified by:
        execute in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • execute

        public boolean execute​(java.lang.String sql,
                               java.lang.String[] columnNames)
                        throws java.sql.SQLException
        Specified by:
        execute in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • getResultSetHoldability

        public int getResultSetHoldability()
                                    throws java.sql.SQLException
        Specified by:
        getResultSetHoldability in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • writeSetSpecialRegister

        void writeSetSpecialRegister​(java.util.ArrayList sqlsttList)
                              throws SqlException
        Throws:
        SqlException
      • readExecuteImmediateForBatch

        private void readExecuteImmediateForBatch​(java.lang.String sql)
                                           throws SqlException
        Throws:
        SqlException
      • writeExecuteCall

        void writeExecuteCall​(boolean outputExpected,
                              java.lang.String procedureName,
                              Section section,
                              int fetchSize,
                              boolean suppressResultSets,
                              int resultSetType,
                              ColumnMetaData parameterMetaData,
                              java.lang.Object[] inputs)
                       throws SqlException
        Throws:
        SqlException
      • setUpdateCount

        public void setUpdateCount​(long updateCount)
      • setOwner

        protected final void setOwner​(java.sql.Statement owner)
        Designates the owner of this statement, typically a logical statement.
        Parameters:
        owner - the owning statement, if any
      • getOwner

        final java.sql.Statement getOwner()
        Returns the owner of this statement, if any.
        Returns:
        The designated owner of this statement, or null if none.
      • willTickleServer

        private boolean willTickleServer​(int number,
                                         boolean allowAutoCommits)
                                  throws SqlException
        Throws:
        SqlException
      • writeCloseResultSets

        final boolean writeCloseResultSets​(boolean allowAutoCommits)
                                    throws SqlException
        The connection close processing passes allowAutoCommits=false because if we drove an auto-commits after each statement close, then when we issue close requests on non-held cursors the server would complain that the non-held cursor was already closed from the previous statement's auto-commit. So the solution is to never auto-commit statements during connection close processing.

        Here's the operative explanation:

        Given a sequence of open statements S1, S2, .... a logic problem is occurring after S1 close-query drives an auto-commit, and S2 close-query is driven against a non-held cursor.

        The first auto-commit driven by S1 triggers a callback that closes S2's non-held cursor, and so the subsequent S2 close-query request generates an error from the server saying that the cursor is already closed.

        This is fixed by passing a flag to our statement close processing that prevents driving additional auto-commits after each statement close. Connection close drives its own final auto-commit.

        Parameters:
        allowAutoCommits -
        Throws:
        SqlException
      • writeCloseResultSets

        private boolean writeCloseResultSets​(int number,
                                             boolean allowAutoCommits)
                                      throws SqlException
        Throws:
        SqlException
      • readCloseResultSets

        final void readCloseResultSets​(boolean allowAutoCommits)
                                throws SqlException
        Throws:
        SqlException
      • readCloseResultSets

        private void readCloseResultSets​(int number,
                                         boolean allowAutoCommits)
                                  throws SqlException
        Throws:
        SqlException
      • flowCloseRetrievedResultSetsOutsideUOW

        private void flowCloseRetrievedResultSetsOutsideUOW()
                                                     throws SqlException
        Throws:
        SqlException
      • markClosed

        void markClosed()
        This method cleans up client-side resources held by this Statement. The Statement will not be removed from the open statements list and PreparedStatement will also not be removed from the commit and rollback listeners list in org.apache.derby.client.am.Connection. This method is called from: 1. finalize() - For the finalizer to be called, the Statement should not have any references and so it should have been already removed from the lists. 2. org.apache.derby.client.am.Connection#markStatementsClosed This method explicitly removes the Statement from open statements list. 3. To close positioned update statements - These statements are not added to the list of open statements.
      • markClosed

        void markClosed​(boolean removeListener)
        This method cleans up client-side resources held by this Statement. If removeListener is true, the Statement is removed from open statements list and PreparedStatement is also removed from commit and rollback listeners list. This is called from the close methods.
        Parameters:
        removeListener - if true the Statement will be removed from the open statements list and PreparedStatement will also be removed from commit and rollback listeners list in org.apache.derby.client.am.Connection.
      • closeEverythingExceptResultSets

        private void closeEverythingExceptResultSets​(boolean removeListener)
        Close all resources except for ResultSets. This code was factored out of markClosed() so that closeMeOnCompletion() could close the Statement without having to re-close the already closed ResultSets.
      • markPreparedStatementForAutoGeneratedKeysClosed

        private void markPreparedStatementForAutoGeneratedKeysClosed()
      • markResultSetsClosed

        final void markResultSetsClosed​(boolean removeListener)
        Mark all ResultSets associated with this statement as closed.
        Parameters:
        removeListener - if true the ResultSets will be removed from the commit and rollback listeners list in org.apache.derby.client.am.Connection.
      • flowExecute

        private void flowExecute​(int executeType,
                                 java.lang.String sql)
                          throws SqlException
        Throws:
        SqlException
      • flowExecuteBatch

        private void flowExecuteBatch​(long[] updateCounts)
                               throws SqlException,
                                      java.sql.BatchUpdateException
        Throws:
        SqlException
        java.sql.BatchUpdateException
      • markPrepared

        private void markPrepared()
      • getJdbcStatementInterfaceName

        protected java.lang.String getJdbcStatementInterfaceName()
        Returns the name of the java.sql interface implemented by this class.
        Returns:
        name of java.sql interface
      • parseSqlAndSetSqlModes

        void parseSqlAndSetSqlModes​(java.lang.String sql)
                             throws SqlException
        Throws:
        SqlException
      • isolateAnyInitialIdentifier

        private java.lang.String isolateAnyInitialIdentifier​(java.lang.String sql)
        Minion of getStatementToken. If the input string starts with an identifier consisting of letters only (like "select", "update"..),return it, else return supplied string.
        Parameters:
        sql - input string
        Returns:
        identifier or unmodified string
        See Also:
        getStatementToken(java.lang.String)
      • getStatementToken

        private java.lang.String getStatementToken​(java.lang.String sql)
                                            throws SqlException
        Step past any initial non-significant characters and comments to find first significant SQL token so we can classify statement.
        Returns:
        first significant SQL token
        Throws:
        SqlException - std exception policy
      • parseUpdateSql

        private void parseUpdateSql​(java.lang.String firstToken)
      • checkForAppropriateSqlMode

        final void checkForAppropriateSqlMode​(int executeType,
                                              int sqlMode)
                                       throws SqlException
        Throws:
        SqlException
      • checkResultSetCount

        private void checkResultSetCount​(int executeType)
                                  throws SqlException
        Checks that the number of result sets returned by the statement is consistent with the executed type. executeQuery() should return exactly one result set and executeUpdate() none. Raises an exception if the result set count does not match the execute type.
        Parameters:
        executeType - one of executeQueryMethod__, executeUpdateMethod__ and executeMethod__
        Throws:
        SqlException - if the number of result sets does not match the execute type
      • checkForStoredProcResultSetCount

        protected final void checkForStoredProcResultSetCount​(int executeType)
                                                       throws SqlException
        Checks that a stored procedure returns the correct number of result sets given its execute type. If the number is incorrect, make sure the transaction is rolled back when auto commit is enabled.
        Parameters:
        executeType - one of executeQueryMethod__, executeUpdateMethod__ and executeMethod__
        Throws:
        SqlException - if the number of result sets does not match the execute type
        See Also:
        checkResultSetCount(int)
      • checkForInvalidBatchedSql

        private void checkForInvalidBatchedSql​(java.lang.String sql)
                                        throws SqlException
        Throws:
        SqlException
      • setupCursorNameCacheAndMappings

        protected void setupCursorNameCacheAndMappings()
      • extractCursorNameFromWhereCurrentOf

        java.lang.String[] extractCursorNameFromWhereCurrentOf​(java.lang.String sql)
      • substituteClientCursorNameWithServerCursorName

        protected java.lang.String substituteClientCursorNameWithServerCursorName​(java.lang.String sql,
                                                                                  Section section)
                                                                           throws SqlException
        Throws:
        SqlException
      • resetCursorNameAndRemoveFromWhereCurrentOfMappings

        void resetCursorNameAndRemoveFromWhereCurrentOfMappings()
      • mapCursorNameToResultSet

        private void mapCursorNameToResultSet()
      • parseStorProcReturnedScrollableRowset

        void parseStorProcReturnedScrollableRowset()
                                            throws SqlException
        Throws:
        SqlException
      • cacheCursorAttributesToSendOnPrepare

        java.lang.String cacheCursorAttributesToSendOnPrepare()
                                                       throws SqlException
        Throws:
        SqlException
      • isQueryMode

        public boolean isQueryMode()
      • removeClientCursorNameFromCache

        protected void removeClientCursorNameFromCache()
      • resultSetCommitting

        boolean resultSetCommitting​(ClientResultSet closingRS,
                                    boolean writeChain)
                             throws SqlException
        Method that checks to see if any other ResultSets are open. If not proceeds with the autocommit.
        Parameters:
        closingRS - The ResultSet to be closed
        writeChain - A Boolean indicating whether this method is part of a chain of write from client to Server
        Throws:
        SqlException
      • markAutoCommitted

        private void markAutoCommitted()
        Mark all ResultSets associated with this statement as auto-committed.
      • closeOnCompletion

        public void closeOnCompletion()
                               throws java.sql.SQLException
        Specified by:
        closeOnCompletion in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • isCloseOnCompletion

        public boolean isCloseOnCompletion()
                                    throws java.sql.SQLException
        Specified by:
        isCloseOnCompletion in interface java.sql.Statement
        Throws:
        java.sql.SQLException
      • closeMeOnCompletion

        void closeMeOnCompletion()
      • isOpen

        private boolean isOpen​(ClientResultSet rs)
                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • resetResultSetList

        void resetResultSetList()
      • getSection

        public Section getSection()
        Provides public access for section_. This is necessary as the section concept is shared between client.am and net. Seems like it really belongs in net as it is tied to the particular protocol used.
        Returns:
        section_
      • setSection

        protected void setSection​(Section s)
        Assigns a new value (even null) to section_. The existing section_ (if any) is freed.
        Parameters:
        s - the section_ to set.