Class JDBC4ResultSet
java.lang.Object
com.mysql.jdbc.ResultSetImpl
com.mysql.jdbc.JDBC4ResultSet
- All Implemented Interfaces:
ResultSetInternalMethods, AutoCloseable, ResultSet, Wrapper
- Direct Known Subclasses:
JDBC42ResultSet
-
Field Summary
Fields inherited from class ResultSetImpl
catalog, columnLabelToIndex, columnNameToIndex, columnToIndexCache, columnUsed, connection, currentRow, doingUpdates, EMPTY_SPACE, fastClientCal, fastDefaultCal, fetchDirection, fetchSize, fields, firstCharOfQuery, fullColumnNameToIndex, gmtCalendar, hasBuiltIndexMapping, isBinaryEncoded, isClosed, MAX_DIFF_PREC, MIN_DIFF_PREC, nextResultSet, onInsertRow, owningStatement, pointOfOrigin, reallyResult, resultCounter, resultId, resultSetConcurrency, resultSetType, retainOwningStatement, rowData, serverInfo, statementUsedForFetchingRows, thisRow, updateCount, updateId, useFastDateParsing, useLegacyDatetimeCode, useUsageAdvisor, warningChain, wasNullFlag, wrapperStatementFields 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 -
Constructor Summary
ConstructorsConstructorDescriptionJDBC4ResultSet(long updateCount, long updateID, MySQLConnection conn, StatementImpl creatorStmt) JDBC4ResultSet(String catalog, Field[] fields, RowData tuples, MySQLConnection conn, StatementImpl creatorStmt) -
Method Summary
Modifier and TypeMethodDescriptionintprotected NClobgetNativeNClob(int columnIndex) JDBC 4.0 Get a NCLOB column.getNCharacterStream(int columnIndex) JDBC 4.0getNCharacterStream(String columnName) JDBC 4.0getNClob(int columnIndex) JDBC 4.0 Get a NCLOB column.JDBC 4.0 Get a NCLOB column.getNString(int columnIndex) JDBC 4.0 Get the value of a column in the current row as a Java StringgetNString(String columnName) JDBC 4.0 The following routines simply convert the columnName into a columnIndex and then call the appropriate routine above.<T> TgetRowId(int columnIndex) getSQLXML(int columnIndex) booleanisWrapperFor(Class<?> iface) Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.<T> TReturns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.voidupdateAsciiStream(int columnIndex, InputStream x) voidupdateAsciiStream(int columnIndex, InputStream x, long length) voidupdateAsciiStream(String columnLabel, InputStream x) voidupdateAsciiStream(String columnLabel, InputStream x, long length) voidupdateBinaryStream(int columnIndex, InputStream x) voidupdateBinaryStream(int columnIndex, InputStream x, long length) voidupdateBinaryStream(String columnLabel, InputStream x) voidupdateBinaryStream(String columnLabel, InputStream x, long length) voidupdateBlob(int columnIndex, InputStream inputStream) voidupdateBlob(int columnIndex, InputStream inputStream, long length) voidupdateBlob(String columnLabel, InputStream inputStream) voidupdateBlob(String columnLabel, InputStream inputStream, long length) voidupdateCharacterStream(int columnIndex, Reader x) voidupdateCharacterStream(int columnIndex, Reader x, long length) voidupdateCharacterStream(String columnLabel, Reader reader) voidupdateCharacterStream(String columnLabel, Reader reader, long length) voidupdateClob(int columnIndex, Reader reader) voidupdateClob(int columnIndex, Reader reader, long length) voidupdateClob(String columnLabel, Reader reader) voidupdateClob(String columnLabel, Reader reader, long length) voidupdateNCharacterStream(int columnIndex, Reader x) voidupdateNCharacterStream(int columnIndex, Reader x, int length) JDBC 4.0 Update a column with a character stream value.voidupdateNCharacterStream(int columnIndex, Reader x, long length) voidupdateNCharacterStream(String columnLabel, Reader reader) voidupdateNCharacterStream(String columnName, Reader reader, int length) JDBC 4.0 Update a column with a character stream value.voidupdateNCharacterStream(String columnLabel, Reader reader, long length) voidupdateNClob(int columnIndex, Reader reader) voidupdateNClob(int columnIndex, Reader reader, long length) voidupdateNClob(int columnIndex, NClob nClob) voidupdateNClob(String columnLabel, Reader reader) voidupdateNClob(String columnLabel, Reader reader, long length) voidupdateNClob(String columnName, NClob nClob) voidupdateNString(int columnIndex, String nString) voidupdateNString(String columnLabel, String nString) voidupdateRowId(int columnIndex, RowId x) voidupdateRowId(String columnName, RowId x) voidupdateSQLXML(int columnIndex, SQLXML xmlObject) voidupdateSQLXML(String columnLabel, SQLXML xmlObject) Methods inherited from class ResultSetImpl
absolute, afterLast, arraysEqual, beforeFirst, buildIndexMapping, cancelRowUpdates, checkClosed, checkColumnBounds, checkRowPos, clearNextResult, clearWarnings, close, convertLongToUlong, copy, deleteRow, fastDateCreate, fastTimeCreate, fastTimestampCreate, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getBytes, getBytesSize, getCalendarInstanceForSessionOrNew, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getDoubleInternal, getDoubleInternal, getExceptionInterceptor, getFetchDirection, getFetchSize, getFirstCharOfQuery, getFloat, getFloat, getGmtCalendar, getId, getInstance, getInstance, getInt, getInt, getLong, getLong, getMetaData, getNativeArray, getNativeAsciiStream, getNativeBigDecimal, getNativeBigDecimal, getNativeBinaryStream, getNativeBlob, getNativeByte, getNativeByte, getNativeBytes, getNativeCharacterStream, getNativeClob, getNativeDate, getNativeDate, getNativeDateViaParseConversion, getNativeDouble, getNativeFloat, getNativeInt, getNativeInt, getNativeLong, getNativeLong, getNativeRef, getNativeShort, getNativeShort, getNativeString, getNativeTimestampViaParseConversion, getNativeTimeViaParseConversion, getNativeUnicodeStream, getNativeURL, getNextResultSet, getObject, getObject, getObject, getObject, getObject, getObjectStoredProc, getObjectStoredProc, getObjectStoredProc, getObjectStoredProc, getRef, getRef, getRow, getServerInfo, getShort, getShort, getStatement, getString, getString, getStringInternal, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getUpdateCount, getUpdateID, getURL, getURL, getWarnings, initializeFromCachedMetaData, initializeWithMetadata, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, populateCachedMetaData, prev, previous, realClose, reallyResult, redefineFieldsForDBMD, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setBinaryEncoded, setFetchDirection, setFetchSize, setFirstCharOfQuery, setNextResultSet, setOwningStatement, setResultSetConcurrency, setResultSetType, setServerInfo, setStatementUsedForFetchingRows, setWrapperStatement, toString, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateShort, updateShort, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNullMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ResultSet
updateObject, updateObject, updateObject, updateObject
-
Constructor Details
-
JDBC4ResultSet
public JDBC4ResultSet(long updateCount, long updateID, MySQLConnection conn, StatementImpl creatorStmt) -
JDBC4ResultSet
public JDBC4ResultSet(String catalog, Field[] fields, RowData tuples, MySQLConnection conn, StatementImpl creatorStmt) throws SQLException - Throws:
SQLException
-
-
Method Details
-
getNCharacterStream
JDBC 4.0Get the value of a column in the current row as a java.io.Reader.
- Parameters:
columnIndex- the column to get the value from- Returns:
- the value in the column as a java.io.Reader.
- Throws:
SQLException- if an error occurs
-
getNCharacterStream
JDBC 4.0Get the value of a column in the current row as a java.io.Reader.
- Parameters:
columnName- the column name to retrieve the value from- Returns:
- the value as a java.io.Reader
- Throws:
SQLException- if an error occurs
-
getNClob
JDBC 4.0 Get a NCLOB column.- Parameters:
i- the first column is 1, the second is 2, ...- Returns:
- an object representing a NCLOB
- Throws:
SQLException- if an error occurs
-
getNClob
JDBC 4.0 Get a NCLOB column.- Parameters:
colName- the column name- Returns:
- an object representing a NCLOB
- Throws:
SQLException- if an error occurs
-
getNativeNClob
JDBC 4.0 Get a NCLOB column.- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- an object representing a NCLOB
- Throws:
SQLException- if an error occurs
-
getNString
JDBC 4.0 Get the value of a column in the current row as a Java String- Parameters:
columnIndex- the first column is 1, the second is 2...- Returns:
- the column value, null for SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getNString
JDBC 4.0 The following routines simply convert the columnName into a columnIndex and then call the appropriate routine above.- Parameters:
columnName- is the SQL name of the column- Returns:
- the column value
- Throws:
SQLException- if a database access error occurs
-
updateNCharacterStream
JDBC 4.0 Update a column with a character stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.- Parameters:
columnIndex- the first column is 1, the second is 2, ...x- the new column valuelength- the length of the stream- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateNCharacterStream
public void updateNCharacterStream(String columnName, Reader reader, int length) throws SQLException JDBC 4.0 Update a column with a character stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.- Parameters:
columnName- the name of the columnreader- the stream to update the column withlength- of the stream- Throws:
SQLException- if a database-access error occurs
-
updateNClob
- Throws:
SQLException- See Also:
-
updateRowId
- Throws:
SQLException
-
updateRowId
- Throws:
SQLException
-
getHoldability
- Throws:
SQLException
-
getRowId
- Throws:
SQLException
-
getRowId
- Throws:
SQLException
-
getSQLXML
- Throws:
SQLException
-
getSQLXML
- Throws:
SQLException
-
updateAsciiStream
- Throws:
SQLException
-
updateAsciiStream
- Throws:
SQLException
-
updateAsciiStream
- Throws:
SQLException
-
updateAsciiStream
- Throws:
SQLException
-
updateBinaryStream
- Throws:
SQLException
-
updateBinaryStream
- Throws:
SQLException
-
updateBinaryStream
- Throws:
SQLException
-
updateBinaryStream
- Throws:
SQLException
-
updateBlob
- Throws:
SQLException
-
updateBlob
- Throws:
SQLException
-
updateBlob
- Throws:
SQLException
-
updateBlob
public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException - Throws:
SQLException
-
updateCharacterStream
- Throws:
SQLException
-
updateCharacterStream
- Throws:
SQLException
-
updateCharacterStream
- Throws:
SQLException
-
updateCharacterStream
public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException - Throws:
SQLException
-
updateClob
- Throws:
SQLException
-
updateClob
- Throws:
SQLException
-
updateClob
- Throws:
SQLException
-
updateClob
- Throws:
SQLException
-
updateNCharacterStream
- Throws:
SQLException
-
updateNCharacterStream
- Throws:
SQLException
-
updateNCharacterStream
- Throws:
SQLException
-
updateNCharacterStream
public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException - Throws:
SQLException
-
updateNClob
- Throws:
SQLException
-
updateNClob
- Throws:
SQLException
-
updateNClob
- Throws:
SQLException
-
updateNClob
- Throws:
SQLException
-
updateNClob
- Throws:
SQLException
-
updateNString
- Throws:
SQLException
-
updateNString
- Throws:
SQLException
-
updateSQLXML
- Throws:
SQLException
-
updateSQLXML
- Throws:
SQLException
-
isWrapperFor
Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does. Returns false otherwise. If this implements the interface then return true, else if this is a wrapper then return the result of recursively callingisWrapperForon the wrapped object. If this does not implement the interface and is not a wrapper, return false. This method should be implemented as a low-cost operation compared tounwrapso that callers can use this method to avoid expensiveunwrapcalls that may fail. If this method returns true then callingunwrapwith the same argument should succeed.- Parameters:
interfaces- a Class defining an interface.- Returns:
- true if this implements the interface or directly or indirectly wraps an object that does.
- Throws:
SQLException- if an error occurs while determining whether this is a wrapper for an object with the given interface.- Since:
- 1.6
-
unwrap
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. The result may be either the object found to implement the interface or a proxy for that object. If the receiver implements the interface then that is the object. If the receiver is a wrapper and the wrapped object implements the interface then that is the object. Otherwise the object is the result of callingunwraprecursively on the wrapped object. If the receiver is not a wrapper and does not implement the interface, then anSQLExceptionis thrown.- Parameters:
iface- A Class defining an interface that the result must implement.- Returns:
- an object that implements the interface. May be a proxy for the actual implementing object.
- Throws:
SQLException- If no object found that implements the interface- Since:
- 1.6
-
getObject
- Specified by:
getObjectin interfaceResultSet- Overrides:
getObjectin classResultSetImpl- Throws:
SQLException
-