Interface ResultSetInternalMethods

All Superinterfaces:
AutoCloseable, ResultSet, Wrapper
All Known Implementing Classes:
JDBC42ResultSet, JDBC42UpdatableResultSet, JDBC4ResultSet, JDBC4UpdatableResultSet, ResultSetImpl, UpdatableResultSet

public interface ResultSetInternalMethods extends ResultSet
This interface is intended to be used by implementors of statement interceptors so that implementors can create static or dynamic (via java.lang.reflect.Proxy) proxy instances of ResultSets. It consists of methods outside of java.sql.Result that are used internally by other classes in the driver. This interface, although public is not designed to be consumed publicly other than for the statement interceptor use case.
  • Method Details

    • copy

      Returns a new instance of this result set, that shares the underlying row data.
      Throws:
      SQLException
    • reallyResult

      boolean reallyResult()
      Does the result set contain rows, or is it the result of a DDL or DML statement?
    • getObjectStoredProc

      Object getObjectStoredProc(int columnIndex, int desiredSqlType) throws SQLException
      Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).
      Throws:
      SQLException
    • getObjectStoredProc

      Object getObjectStoredProc(int i, Map<Object,Object> map, int desiredSqlType) throws SQLException
      Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).
      Throws:
      SQLException
    • getObjectStoredProc

      Object getObjectStoredProc(String columnName, int desiredSqlType) throws SQLException
      Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).
      Throws:
      SQLException
    • getObjectStoredProc

      Object getObjectStoredProc(String colName, Map<Object,Object> map, int desiredSqlType) throws SQLException
      Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).
      Throws:
      SQLException
    • getServerInfo

      String getServerInfo()
      Returns the server informational message returned from a DDL or DML statement (if any), or null if none.
    • getUpdateCount

      long getUpdateCount()
      Returns the update count for this result set (if one exists), otherwise -1.
    • getUpdateID

      long getUpdateID()
      Returns the AUTO_INCREMENT value for the DDL/DML statement which created this result set.
      Returns:
      the AUTO_INCREMENT value for the DDL/DML statement which created this result set.
    • realClose

      void realClose(boolean calledExplicitly) throws SQLException
      Closes this ResultSet and releases resources.
      Parameters:
      calledExplicitly - was realClose called by the standard ResultSet.close() method, or was it closed internally by the driver?
      Throws:
      SQLException
    • isClosed

      boolean isClosed() throws SQLException
      Returns true if this ResultSet is closed
      Specified by:
      isClosed in interface ResultSet
      Throws:
      SQLException
    • setFirstCharOfQuery

      void setFirstCharOfQuery(char firstCharUpperCase)
      Sets the first character of the query that was issued to create this result set. The character should be upper-cased.
    • setOwningStatement

      void setOwningStatement(StatementImpl owningStatement)
      Sets the statement that "owns" this result set (usually used when the result set should internally "belong" to one statement, but is created by another.
    • getFirstCharOfQuery

      char getFirstCharOfQuery()
      Returns the first character of the query that was issued to create this result set, upper-cased.
    • clearNextResult

      void clearNextResult()
      Clears the reference to the next result set in a multi-result set "chain".
    • getNextResultSet

      ResultSetInternalMethods getNextResultSet()
      Returns the next ResultSet in a multi-resultset "chain", if any, null if none exists.
    • setStatementUsedForFetchingRows

      void setStatementUsedForFetchingRows(PreparedStatement stmt)
    • setWrapperStatement

      void setWrapperStatement(Statement wrapperStatement)
      Parameters:
      wrapperStatement - The wrapperStatement to set.
    • buildIndexMapping

      void buildIndexMapping() throws SQLException
      Builds a hash between column names and their indices for fast retrieval. This is done lazily to support findColumn() and get*(String), as it can be more expensive than just retrieving result set values by ordinal index.
      Throws:
      SQLException
    • initializeWithMetadata

      void initializeWithMetadata() throws SQLException
      Throws:
      SQLException
    • redefineFieldsForDBMD

      void redefineFieldsForDBMD(Field[] metadataFields)
      Used by DatabaseMetadata implementations to coerce the metadata returned by metadata queries into that required by the JDBC specification.
      Parameters:
      metadataFields - the coerced metadata to be applied to result sets returned by "SHOW ..." or SELECTs on INFORMATION_SCHEMA performed on behalf of methods in DatabaseMetadata.
    • populateCachedMetaData

      void populateCachedMetaData(CachedResultSetMetaData cachedMetaData) throws SQLException
      Throws:
      SQLException
    • initializeFromCachedMetaData

      void initializeFromCachedMetaData(CachedResultSetMetaData cachedMetaData)
    • getBytesSize

      int getBytesSize() throws SQLException
      Throws:
      SQLException
    • getId

      int getId()