Class JDBC4UpdatableResultSet
java.lang.Object
com.mysql.jdbc.ResultSetImpl
com.mysql.jdbc.UpdatableResultSet
com.mysql.jdbc.JDBC4UpdatableResultSet
- All Implemented Interfaces:
ResultSetInternalMethods, AutoCloseable, ResultSet, Wrapper
- Direct Known Subclasses:
JDBC42UpdatableResultSet
-
Field Summary
Fields inherited from class UpdatableResultSet
charConverter, inserter, STREAM_DATA_MARKER, updaterFields 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
ConstructorsConstructorDescriptionJDBC4UpdatableResultSet(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.getRowId(int columnIndex) getSQLXML(int columnIndex) booleanisClosed()Returns true if this ResultSet is closed.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 x) JDBC 4.0 Update a column with NATIONAL CHARACTER.voidupdateNString(String columnName, String x) JDBC 4.0 Update a column with NATIONAL CHARACTER.voidupdateRowId(int columnIndex, RowId x) voidupdateSQLXML(int columnIndex, SQLXML xmlObject) voidupdateSQLXML(String columnLabel, SQLXML xmlObject) Methods inherited from class UpdatableResultSet
absolute, afterLast, beforeFirst, cancelRowUpdates, checkRowPos, checkUpdatability, deleteRow, first, generateStatements, getConcurrency, insertRow, isAfterLast, isBeforeFirst, isFirst, isLast, isUpdatable, last, moveToCurrentRow, moveToInsertRow, next, prev, previous, realClose, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setResultSetConcurrency, syncUpdate, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateObjectInternal, updateRow, updateShort, updateShort, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestampMethods inherited from class ResultSetImpl
arraysEqual, buildIndexMapping, checkClosed, checkColumnBounds, clearNextResult, clearWarnings, close, convertLongToUlong, copy, fastDateCreate, fastTimeCreate, fastTimestampCreate, findColumn, 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, 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, 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, populateCachedMetaData, reallyResult, redefineFieldsForDBMD, setBinaryEncoded, setFetchDirection, setFetchSize, setFirstCharOfQuery, setNextResultSet, setOwningStatement, setResultSetType, setServerInfo, setStatementUsedForFetchingRows, setWrapperStatement, toString, updateArray, updateArray, updateClob, updateRef, updateRef, wasNullMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ResultSet
updateObject, updateObject, updateObject, updateObject, updateRowId
-
Constructor Details
-
JDBC4UpdatableResultSet
public JDBC4UpdatableResultSet(String catalog, Field[] fields, RowData tuples, MySQLConnection conn, StatementImpl creatorStmt) throws SQLException - Throws:
SQLException
-
-
Method Details
-
updateAsciiStream
- Throws:
SQLException
-
updateAsciiStream
- Throws:
SQLException
-
updateBinaryStream
- Throws:
SQLException
-
updateBinaryStream
- Throws:
SQLException
-
updateBlob
- Throws:
SQLException
-
updateBlob
- Throws:
SQLException
-
updateCharacterStream
- Throws:
SQLException
-
updateCharacterStream
- Throws:
SQLException
-
updateClob
- Throws:
SQLException
-
updateClob
- Throws:
SQLException
-
updateNCharacterStream
- Throws:
SQLException
-
updateNCharacterStream
- Throws:
SQLException
-
updateNClob
- Throws:
SQLException
-
updateNClob
- Throws:
SQLException
-
updateSQLXML
- Throws:
SQLException
-
updateRowId
- Throws:
SQLException
-
updateAsciiStream
- Throws:
SQLException
-
updateAsciiStream
- Throws:
SQLException
-
updateBinaryStream
- Throws:
SQLException
-
updateBinaryStream
- Throws:
SQLException
-
updateBlob
- Throws:
SQLException
-
updateBlob
public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException - 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
-
updateNCharacterStream
- Throws:
SQLException
-
updateNCharacterStream
public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException - Throws:
SQLException
-
updateNClob
- Throws:
SQLException
-
updateNClob
- Throws:
SQLException
-
updateSQLXML
- Throws:
SQLException
-
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 occurs
-
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 new column valuelength- of the stream- Throws:
SQLException- if a database-access error occurs
-
updateNClob
- Throws:
SQLException- See Also:
-
updateNClob
- Throws:
SQLException- See Also:
-
updateNString
JDBC 4.0 Update a column with NATIONAL CHARACTER. 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 value- Throws:
SQLException- if a database-access error occurs
-
updateNString
JDBC 4.0 Update a column with NATIONAL CHARACTER. 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 columnx- the new column value- Throws:
SQLException- if a database-access error occurs
-
getHoldability
- Throws:
SQLException
-
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
-
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
-
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
-
getRowId
- Throws:
SQLException
-
getRowId
- Throws:
SQLException
-
getSQLXML
- Throws:
SQLException
-
getSQLXML
- Throws:
SQLException
-
isClosed
Description copied from class:ResultSetImplReturns true if this ResultSet is closed.- Specified by:
isClosedin interfaceResultSet- Specified by:
isClosedin interfaceResultSetInternalMethods- Overrides:
isClosedin classResultSetImpl- 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
-