Interface ResultSetInternalMethods
- All Superinterfaces:
AutoCloseable, ResultSet, Wrapper
- All Known Implementing Classes:
JDBC42ResultSet, JDBC42UpdatableResultSet, JDBC4ResultSet, JDBC4UpdatableResultSet, ResultSetImpl, UpdatableResultSet
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.
-
Field Summary
Fields inherited from interface ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE -
Method Summary
Modifier and TypeMethodDescriptionvoidBuilds a hash between column names and their indices for fast retrieval.voidClears the reference to the next result set in a multi-result set "chain".copy()Returns a new instance of this result set, that shares the underlying row data.intcharReturns the first character of the query that was issued to create this result set, upper-cased.intgetId()Returns the next ResultSet in a multi-resultset "chain", if any, null if none exists.getObjectStoredProc(int columnIndex, int desiredSqlType) Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).getObjectStoredProc(int i, Map<Object, Object> map, int desiredSqlType) Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).getObjectStoredProc(String columnName, int desiredSqlType) Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).getObjectStoredProc(String colName, Map<Object, Object> map, int desiredSqlType) Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).Returns the server informational message returned from a DDL or DML statement (if any), or null if none.longReturns the update count for this result set (if one exists), otherwise -1.longReturns the AUTO_INCREMENT value for the DDL/DML statement which created this result set.voidinitializeFromCachedMetaData(CachedResultSetMetaData cachedMetaData) voidbooleanisClosed()Returns true if this ResultSet is closedvoidpopulateCachedMetaData(CachedResultSetMetaData cachedMetaData) voidrealClose(boolean calledExplicitly) Closes this ResultSet and releases resources.booleanDoes the result set contain rows, or is it the result of a DDL or DML statement?voidredefineFieldsForDBMD(Field[] metadataFields) Used by DatabaseMetadata implementations to coerce the metadata returned by metadata queries into that required by the JDBC specification.voidsetFirstCharOfQuery(char firstCharUpperCase) Sets the first character of the query that was issued to create this result set.voidsetOwningStatement(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.voidvoidsetWrapperStatement(Statement wrapperStatement) Methods inherited from interface ResultSet
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getInt, getLong, getLong, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNullMethods inherited from interface Wrapper
isWrapperFor, unwrap
-
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
Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).- Throws:
SQLException
-
getObjectStoredProc
Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).- Throws:
SQLException
-
getObjectStoredProc
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 SQLExceptionFunctions 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
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
Returns true if this ResultSet is closed- Specified by:
isClosedin interfaceResultSet- 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
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
-
setWrapperStatement
- Parameters:
wrapperStatement- The wrapperStatement to set.
-
buildIndexMapping
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
- Throws:
SQLException
-
redefineFieldsForDBMD
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
- Throws:
SQLException
-
initializeFromCachedMetaData
-
getBytesSize
- Throws:
SQLException
-
getId
int getId()
-