Class ResultSetImpl
- All Implemented Interfaces:
ResultSetInternalMethods, AutoCloseable, ResultSet, Wrapper
- Direct Known Subclasses:
JDBC4ResultSet, UpdatableResultSet
A ResultSet maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The 'next' method moves the cursor to the next row.
The getXXX methods retrieve column values for the current row. You can retrieve values either using the index number of the column, or by using the name of the column. In general using the column index will be more efficient. Columns are numbered from 1.
For maximum portability, ResultSet columns within each row should be read in left-to-right order and each column should be read only once.
For the getXXX methods, the JDBC driver attempts to convert the underlying data to the specified Java type and returns a suitable Java value. See the JDBC specification for allowable mappings from SQL types to Java types with the ResultSet getXXX methods.
Column names used as input to getXXX methods are case insenstive. When performing a getXXX using a column name, if several columns have the same name, then the value of the first matching column will be returned. The column name option is designed to be used when column names are used in the SQL Query. For columns that are NOT explicitly named in the query, it is best to use column numbers. If column names were used there is no way for the programmer to guarentee that they actually refer to the intended columns.
A ResultSet is automatically closed by the Statement that generated it when that Statement is closed, re-executed, or is used to retrieve the next result from a sequence of multiple results.
The number, types and properties of a ResultSet's columns are provided by the ResultSetMetaData object returned by the getMetaData method.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe catalog that was in use when we were createdMap column names (and all of their permutations) to column indicesThe above map is a case-insensitive tree-map, it can be slow, this caches lookups into that map, because the other alternative is to create new object instances for every call to findColumn()....protected boolean[]Keep track of columns accessedprotected MySQLConnectionThe Connection instance that created usprotected intThe current row #, -1 == before start of result setprotected booleanAre we in the middle of doing updates to the current row?(package private) static final char[](package private) Calendar(package private) Calendarprotected intThe direction to fetch rows (always FETCH_FORWARD)protected intThe number of rows to fetch in one go...protected Field[]The fields for this result setprotected charFirst character of the query that created this result set...Used to determine whether or not to parse server info messages in certain circumstances.Map of fully-specified column names to column indicesprotected Calendarprotected booleanprotected booleanIs the data stored as strings (default) or natively (which is the case with results from PrepStmts)protected booleanHas this result set been closed?protected static final doubleEpsillon between Float.MAX_VALUE and the double representation of said value.protected static final doubleEpsillon between Float.MIN_VALUE and the double representation of said value.protected ResultSetInternalMethodsprotected booleanAre we on the insert row?protected StatementImplThe statement that created usprotected StringStackTrace generated where ResultSet was created... used when profilingprotected booleanDo we actually contain rows, or just information about UPDATE/INSERT/DELETE?(package private) static intCounter used to generate IDs for profiling.protected intThe id (used when profiling) to identify usprotected intAre we read-only or updatable?protected intAre we scroll-sensitive/insensitive?protected booleanprotected RowDataThe actual rowsprotected StringAny info message from the server that was created while generating this result set (if 'info parsing' is enabled for the connection).(package private) PreparedStatementprotected ResultSetRowPointer to current row dataprotected longHow many rows were affected by UPDATE/INSERT/DELETE?protected longValue generated for AUTO_INCREMENT columnsprotected booleanprotected booleanprotected booleanprotected SQLWarningThe warning chainprotected booleanDid the previous value retrieval find a NULL?protected StatementFields 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
ConstructorsConstructorDescriptionResultSetImpl(long updateCount, long updateID, MySQLConnection conn, StatementImpl creatorStmt) Create a result set for an executeUpdate statement.ResultSetImpl(String catalog, Field[] fields, RowData tuples, MySQLConnection conn, StatementImpl creatorStmt) Creates a new ResultSet object. -
Method Summary
Modifier and TypeMethodDescriptionbooleanabsolute(int row) JDBC 2.0voidJDBC 2.0static booleanarraysEqual(byte[] left, byte[] right) voidJDBC 2.0voidBuilds a hash between column names and their indices for fast retrieval.voidJDBC 2.0 The cancelRowUpdates() method may be called after calling an updateXXX() method(s) and before calling updateRow() to rollback the updates made to a row.protected final MySQLConnectionEnsures that the result set is not closedprotected final voidcheckColumnBounds(int columnIndex) Checks if columnIndex is within the number of columns in this result set.protected voidEnsures that the cursor is positioned on a valid row and that the result set is not closedvoidWe can't do this ourselves, otherwise the contract for Statement.getMoreResults() won't work correctly.voidAfter this call, getWarnings returns null until a new warning is reported for this ResultSetvoidclose()In some cases, it is desirable to immediately release a ResultSet database and JDBC resources instead of waiting for this to happen when it is automatically closed.protected static BigIntegerconvertLongToUlong(long longVal) Converts the given value as a java long, to an 'unsigned' long, using the java.math.BigInteger class.copy()Returns a new instance of this result set, that shares the underlying row data.voidJDBC 2.0 Delete the current row from the result set and the underlying database.protected DatefastDateCreate(Calendar cal, int year, int month, int day) protected TimefastTimeCreate(Calendar cal, int hour, int minute, int second) protected TimestampfastTimestampCreate(Calendar cal, int year, int month, int day, int hour, int minute, int seconds, int secondsPart, boolean useGmtMillis) intfindColumn(String columnName) booleanfirst()JDBC 2.0getArray(int i) JDBC 2.0 Get an array column.JDBC 2.0 Get an array column.getAsciiStream(int columnIndex) A column value can be retrieved as a stream of ASCII characters and then read in chunks from the stream.getAsciiStream(String columnName) getBigDecimal(int columnIndex) JDBC 2.0 Get the value of a column in the current row as a java.math.BigDecimal object.getBigDecimal(int columnIndex, int scale) Deprecated.getBigDecimal(String columnName) JDBC 2.0 Get the value of a column in the current row as a java.math.BigDecimal object.getBigDecimal(String columnName, int scale) Deprecated.getBinaryStream(int columnIndex) A column value can also be retrieved as a binary stream.getBinaryStream(String columnName) getBlob(int columnIndex) JDBC 2.0 Get a BLOB column.JDBC 2.0 Get a BLOB column.booleangetBoolean(int columnIndex) Get the value of a column in the current row as a Java booleanbooleangetBoolean(String columnName) bytegetByte(int columnIndex) Get the value of a column in the current row as a Java byte.bytebyte[]getBytes(int columnIndex) Get the value of a column in the current row as a Java byte array.protected byte[]getBytes(int columnIndex, boolean noConversion) byte[]intprotected CalendarOptimization to only use one calendar per-session, or calculate it for each call, depending on user configurationgetCharacterStream(int columnIndex) JDBC 2.0getCharacterStream(String columnName) JDBC 2.0getClob(int i) JDBC 2.0 Get a CLOB column.JDBC 2.0 Get a CLOB column.intJDBC 2.0 Return the concurrency of this result set.Get the name of the SQL cursor used by this ResultSetgetDate(int columnIndex) Get the value of a column in the current row as a java.sql.Date objectJDBC 2.0 Get the value of a column in the current row as a java.sql.Date object.Get the value of a column in the current row as a java.sql.Date object.doublegetDouble(int columnIndex) Get the value of a column in the current row as a Java double.doubleprotected doublegetDoubleInternal(int colIndex) Converts a string representation of a number to a double.protected doublegetDoubleInternal(String stringVal, int colIndex) Converts a string representation of a number to a double.protected ExceptionInterceptorintJDBC 2.0 Returns the fetch direction for this result set.intJDBC 2.0 Return the fetch size for this result set.charReturns the first character of the query that this result set was created from.floatgetFloat(int columnIndex) Get the value of a column in the current row as a Java float.floatprotected CalendarintgetId()protected static ResultSetImplgetInstance(long updateCount, long updateID, MySQLConnection conn, StatementImpl creatorStmt) protected static ResultSetImplgetInstance(String catalog, Field[] fields, RowData tuples, MySQLConnection conn, StatementImpl creatorStmt, boolean isUpdatable) Creates a result set instance that represents a query result -- We need to provide factory-style methods so we can support both JDBC3 (and older) and JDBC4 runtimes, otherwise the class verifier complains when it tries to load JDBC4-only interface classes that are present in JDBC4 method signatures.intgetInt(int columnIndex) Get the value of a column in the current row as a Java int.intlonggetLong(int columnIndex) Get the value of a column in the current row as a Java long.longThe numbers, types and properties of a ResultSet's columns are provided by the getMetaData methodprotected ArraygetNativeArray(int i) JDBC 2.0 Get an array column.protected InputStreamgetNativeAsciiStream(int columnIndex) A column value can be retrieved as a stream of ASCII characters and then read in chunks from the stream.protected BigDecimalgetNativeBigDecimal(int columnIndex) JDBC 2.0 Get the value of a column in the current row as a java.math.BigDecimal object.protected BigDecimalgetNativeBigDecimal(int columnIndex, int scale) Get the value of a column in the current row as a java.math.BigDecimal objectprotected InputStreamgetNativeBinaryStream(int columnIndex) A column value can also be retrieved as a binary stream.protected BlobgetNativeBlob(int columnIndex) JDBC 2.0 Get a BLOB column.protected bytegetNativeByte(int columnIndex) Get the value of a column in the current row as a Java byte.protected bytegetNativeByte(int columnIndex, boolean overflowCheck) protected byte[]getNativeBytes(int columnIndex, boolean noConversion) Get the value of a column in the current row as a Java byte array.protected ReadergetNativeCharacterStream(int columnIndex) JDBC 2.0protected ClobgetNativeClob(int columnIndex) JDBC 2.0 Get a CLOB column.protected DategetNativeDate(int columnIndex) Get the value of a column in the current row as a java.sql.Date objectprotected DategetNativeDate(int columnIndex, Calendar cal) JDBC 2.0 Get the value of a column in the current row as a java.sql.Date object.(package private) DategetNativeDateViaParseConversion(int columnIndex) protected doublegetNativeDouble(int columnIndex) Get the value of a column in the current row as a Java double.protected floatgetNativeFloat(int columnIndex) Get the value of a column in the current row as a Java float.protected intgetNativeInt(int columnIndex) Get the value of a column in the current row as a Java int.protected intgetNativeInt(int columnIndex, boolean overflowCheck) protected longgetNativeLong(int columnIndex) Get the value of a column in the current row as a Java long.protected longgetNativeLong(int columnIndex, boolean overflowCheck, boolean expandUnsignedLong) protected RefgetNativeRef(int i) JDBC 2.0 Get a REF(<structured-type>) column.protected shortgetNativeShort(int columnIndex) Get the value of a column in the current row as a Java short.protected shortgetNativeShort(int columnIndex, boolean overflowCheck) protected StringgetNativeString(int columnIndex) Get the value of a column in the current row as a Java String(package private) TimestampgetNativeTimestampViaParseConversion(int columnIndex, Calendar targetCalendar, TimeZone tz, boolean rollForward) (package private) TimegetNativeTimeViaParseConversion(int columnIndex, Calendar targetCalendar, TimeZone tz, boolean rollForward) protected InputStreamgetNativeUnicodeStream(int columnIndex) A column value can also be retrieved as a stream of Unicode characters.protected URLgetNativeURL(int colIndex) Returns the next ResultSet in a multi-resultset "chain", if any, null if none exists.getObject(int columnIndex) Get the value of a column in the current row as a Java object<T> TJDBC 2.0 Returns the value of column i as a Java object.Get the value of a column in the current row as a Java object<T> TJDBC 2.0 Returns the value of column i as a Java object.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()).getRef(int i) JDBC 2.0 Get a REF(<structured-type>) column.JDBC 2.0 Get a REF(<structured-type>) column.intgetRow()JDBC 2.0Returns the server info (if any), or null if none.shortgetShort(int columnIndex) Get the value of a column in the current row as a Java short.shortJDBC 2.0 Return the Statement that produced the ResultSet.getString(int columnIndex) Get the value of a column in the current row as a Java StringThe following routines simply convert the columnName into a columnIndex and then call the appropriate routine above.protected StringgetStringInternal(int columnIndex, boolean checkDateTypes) getTime(int columnIndex) Get the value of a column in the current row as a java.sql.Time objectGet the value of a column in the current row as a java.sql.Time object.Get the value of a column in the current row as a java.sql.Time object.Get the value of a column in the current row as a java.sql.Time object.getTimestamp(int columnIndex) Get the value of a column in the current row as a java.sql.Timestamp objectgetTimestamp(int columnIndex, Calendar cal) Get the value of a column in the current row as a java.sql.Timestamp object.getTimestamp(String columnName) getTimestamp(String columnName, Calendar cal) Get the value of a column in the current row as a java.sql.Timestamp object.intgetType()JDBC 2.0 Return the type of this result set.getUnicodeStream(int columnIndex) Deprecated.getUnicodeStream(String columnName) Deprecated.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.getURL(int colIndex) The first warning reported by calls on this ResultSet is returned.voidinitializeFromCachedMetaData(CachedResultSetMetaData cachedMetaData) voidvoidJDBC 2.0 Insert the contents of the insert row into the result set and the database.booleanJDBC 2.0booleanJDBC 2.0booleanisClosed()Returns true if this ResultSet is closed.booleanisFirst()JDBC 2.0booleanisLast()JDBC 2.0booleanlast()JDBC 2.0voidJDBC 2.0 Move the cursor to the remembered cursor position, usually the current row.voidJDBC 2.0 Move to the insert row.booleannext()A ResultSet is initially positioned before its first row, the first call to next makes the first row the current row; the second call makes the second row the current row, etc.voidpopulateCachedMetaData(CachedResultSetMetaData cachedMetaData) booleanprev()The prev method is not part of JDBC, but because of the architecture of this driver it is possible to move both forward and backward within the result set.booleanprevious()JDBC 2.0voidrealClose(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?voidUsed by DatabaseMetadata implementations to coerce the metadata returned by metadata queries into that required by the JDBC specification.voidJDBC 2.0 Refresh the value of the current row with its current value in the database.booleanrelative(int rows) JDBC 2.0booleanJDBC 2.0 Determine if this row has been deleted.booleanJDBC 2.0 Determine if the current row has been inserted.booleanJDBC 2.0 Determine if the current row has been updated.protected voidFlag that this result set is 'binary' encoded (from a PreparedStatement), not stored as strings.voidsetFetchDirection(int direction) JDBC 2.0 Give a hint as to the direction in which the rows in this result set will be processed.voidsetFetchSize(int rows) JDBC 2.0 Give the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this result set.voidsetFirstCharOfQuery(char c) Sets the first character of the query that this result set was created from.protected voidsetNextResultSet(ResultSetInternalMethods nextResultSet) 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.protected voidsetResultSetConcurrency(int concurrencyFlag) Sets the concurrency (JDBC2)protected voidsetResultSetType(int typeFlag) Sets the result set type for (JDBC2)protected voidsetServerInfo(String info) Sets server info (if any)voidvoidsetWrapperStatement(Statement wrapperStatement) toString()voidupdateArray(int arg0, Array arg1) voidupdateArray(String arg0, Array arg1) voidupdateAsciiStream(int columnIndex, InputStream x, int length) JDBC 2.0 Update a column with an ascii stream value.voidupdateAsciiStream(String columnName, InputStream x, int length) JDBC 2.0 Update a column with an ascii stream value.voidupdateBigDecimal(int columnIndex, BigDecimal x) JDBC 2.0 Update a column with a BigDecimal value.voidupdateBigDecimal(String columnName, BigDecimal x) JDBC 2.0 Update a column with a BigDecimal value.voidupdateBinaryStream(int columnIndex, InputStream x, int length) JDBC 2.0 Update a column with a binary stream value.voidupdateBinaryStream(String columnName, InputStream x, int length) JDBC 2.0 Update a column with a binary stream value.voidupdateBlob(int arg0, Blob arg1) voidupdateBlob(String arg0, Blob arg1) voidupdateBoolean(int columnIndex, boolean x) JDBC 2.0 Update a column with a boolean value.voidupdateBoolean(String columnName, boolean x) JDBC 2.0 Update a column with a boolean value.voidupdateByte(int columnIndex, byte x) JDBC 2.0 Update a column with a byte value.voidupdateByte(String columnName, byte x) JDBC 2.0 Update a column with a byte value.voidupdateBytes(int columnIndex, byte[] x) JDBC 2.0 Update a column with a byte array value.voidupdateBytes(String columnName, byte[] x) JDBC 2.0 Update a column with a byte array value.voidupdateCharacterStream(int columnIndex, Reader x, int length) JDBC 2.0 Update a column with a character stream value.voidupdateCharacterStream(String columnName, Reader reader, int length) JDBC 2.0 Update a column with a character stream value.voidupdateClob(int arg0, Clob arg1) voidupdateClob(String columnName, Clob clob) voidupdateDate(int columnIndex, Date x) JDBC 2.0 Update a column with a Date value.voidupdateDate(String columnName, Date x) JDBC 2.0 Update a column with a Date value.voidupdateDouble(int columnIndex, double x) JDBC 2.0 Update a column with a Double value.voidupdateDouble(String columnName, double x) JDBC 2.0 Update a column with a double value.voidupdateFloat(int columnIndex, float x) JDBC 2.0 Update a column with a float value.voidupdateFloat(String columnName, float x) JDBC 2.0 Update a column with a float value.voidupdateInt(int columnIndex, int x) JDBC 2.0 Update a column with an integer value.voidJDBC 2.0 Update a column with an integer value.voidupdateLong(int columnIndex, long x) JDBC 2.0 Update a column with a long value.voidupdateLong(String columnName, long x) JDBC 2.0 Update a column with a long value.voidupdateNull(int columnIndex) JDBC 2.0 Give a nullable column a null value.voidupdateNull(String columnName) JDBC 2.0 Update a column with a null value.voidupdateObject(int columnIndex, Object x) JDBC 2.0 Update a column with an Object value.voidupdateObject(int columnIndex, Object x, int scale) JDBC 2.0 Update a column with an Object value.voidupdateObject(String columnName, Object x) JDBC 2.0 Update a column with an Object value.voidupdateObject(String columnName, Object x, int scale) JDBC 2.0 Update a column with an Object value.voidvoidvoidJDBC 2.0 Update the underlying database with the new contents of the current row.voidupdateShort(int columnIndex, short x) JDBC 2.0 Update a column with a short value.voidupdateShort(String columnName, short x) JDBC 2.0 Update a column with a short value.voidupdateString(int columnIndex, String x) JDBC 2.0 Update a column with a String value.voidupdateString(String columnName, String x) JDBC 2.0 Update a column with a String value.voidupdateTime(int columnIndex, Time x) JDBC 2.0 Update a column with a Time value.voidupdateTime(String columnName, Time x) JDBC 2.0 Update a column with a Time value.voidupdateTimestamp(int columnIndex, Timestamp x) JDBC 2.0 Update a column with a Timestamp value.voidupdateTimestamp(String columnName, Timestamp x) JDBC 2.0 Update a column with a Timestamp value.booleanwasNull()A column may have the value of SQL NULL; wasNull() reports whether the last column read had this special value.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ResultSet
getHoldability, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getRowId, getRowId, getSQLXML, getSQLXML, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateObject, updateObject, updateObject, updateObject, updateRowId, updateRowId, updateSQLXML, updateSQLXMLMethods inherited from interface Wrapper
isWrapperFor, unwrap
-
Field Details
-
MIN_DIFF_PREC
protected static final double MIN_DIFF_PRECEpsillon between Float.MIN_VALUE and the double representation of said value. -
MAX_DIFF_PREC
protected static final double MAX_DIFF_PRECEpsillon between Float.MAX_VALUE and the double representation of said value. -
resultCounter
static int resultCounterCounter used to generate IDs for profiling. -
catalog
The catalog that was in use when we were created -
columnLabelToIndex
-
columnToIndexCache
-
columnUsed
protected boolean[] columnUsedKeep track of columns accessed -
connection
The Connection instance that created us -
currentRow
protected int currentRowThe current row #, -1 == before start of result set -
doingUpdates
protected boolean doingUpdatesAre we in the middle of doing updates to the current row? -
fastDefaultCal
Calendar fastDefaultCal -
fastClientCal
Calendar fastClientCal -
fetchDirection
protected int fetchDirectionThe direction to fetch rows (always FETCH_FORWARD) -
fetchSize
protected int fetchSizeThe number of rows to fetch in one go... -
fields
The fields for this result set -
firstCharOfQuery
protected char firstCharOfQueryFirst character of the query that created this result set...Used to determine whether or not to parse server info messages in certain circumstances. -
fullColumnNameToIndex
-
columnNameToIndex
-
hasBuiltIndexMapping
protected boolean hasBuiltIndexMapping -
isBinaryEncoded
protected boolean isBinaryEncodedIs the data stored as strings (default) or natively (which is the case with results from PrepStmts) -
isClosed
protected boolean isClosedHas this result set been closed? -
nextResultSet
-
onInsertRow
protected boolean onInsertRowAre we on the insert row? -
owningStatement
The statement that created us -
pointOfOrigin
StackTrace generated where ResultSet was created... used when profiling -
reallyResult
protected boolean reallyResultDo we actually contain rows, or just information about UPDATE/INSERT/DELETE? -
resultId
protected int resultIdThe id (used when profiling) to identify us -
resultSetConcurrency
protected int resultSetConcurrencyAre we read-only or updatable? -
resultSetType
protected int resultSetTypeAre we scroll-sensitive/insensitive? -
rowData
The actual rows -
serverInfo
Any info message from the server that was created while generating this result set (if 'info parsing' is enabled for the connection). -
statementUsedForFetchingRows
PreparedStatement statementUsedForFetchingRows -
thisRow
Pointer to current row data -
updateCount
protected long updateCountHow many rows were affected by UPDATE/INSERT/DELETE? -
updateId
protected long updateIdValue generated for AUTO_INCREMENT columns -
useUsageAdvisor
protected boolean useUsageAdvisor -
warningChain
The warning chain -
wasNullFlag
protected boolean wasNullFlagDid the previous value retrieval find a NULL? -
wrapperStatement
-
retainOwningStatement
protected boolean retainOwningStatement -
gmtCalendar
-
useFastDateParsing
protected boolean useFastDateParsing -
EMPTY_SPACE
static final char[] EMPTY_SPACE -
useLegacyDatetimeCode
protected boolean useLegacyDatetimeCode
-
-
Constructor Details
-
ResultSetImpl
public ResultSetImpl(long updateCount, long updateID, MySQLConnection conn, StatementImpl creatorStmt) Create a result set for an executeUpdate statement.- Parameters:
updateCount- the number of rows affected by the updateupdateID- the autoincrement value (if any)conn-creatorStmt-
-
ResultSetImpl
public ResultSetImpl(String catalog, Field[] fields, RowData tuples, MySQLConnection conn, StatementImpl creatorStmt) throws SQLException Creates a new ResultSet object.- Parameters:
catalog- the database in use when we were createdfields- an array of Field objects (basically, the ResultSet MetaData)tuples- actual row dataconn- the Connection that created us.creatorStmt-- Throws:
SQLException- if an error occurs
-
-
Method Details
-
convertLongToUlong
Converts the given value as a java long, to an 'unsigned' long, using the java.math.BigInteger class. -
getInstance
protected static ResultSetImpl getInstance(long updateCount, long updateID, MySQLConnection conn, StatementImpl creatorStmt) throws SQLException - Throws:
SQLException
-
getInstance
protected static ResultSetImpl getInstance(String catalog, Field[] fields, RowData tuples, MySQLConnection conn, StatementImpl creatorStmt, boolean isUpdatable) throws SQLException Creates a result set instance that represents a query result -- We need to provide factory-style methods so we can support both JDBC3 (and older) and JDBC4 runtimes, otherwise the class verifier complains when it tries to load JDBC4-only interface classes that are present in JDBC4 method signatures.- Throws:
SQLException
-
initializeWithMetadata
- Specified by:
initializeWithMetadatain interfaceResultSetInternalMethods- Throws:
SQLException
-
absolute
JDBC 2.0Move to an absolute row number in the result set.
If row is positive, moves to an absolute row with respect to the beginning of the result set. The first row is row 1, the second is row 2, etc.
If row is negative, moves to an absolute row position with respect to the end of result set. For example, calling absolute(-1) positions the cursor on the last row, absolute(-2) indicates the next-to-last row, etc.
An attempt to position the cursor beyond the first/last row in the result set, leaves the cursor before/after the first/last row, respectively.
Note: Calling absolute(1) is the same as calling first(). Calling absolute(-1) is the same as calling last().
- Specified by:
absolutein interfaceResultSet- Parameters:
row- the row number to move to- Returns:
- true if on the result set, false if off.
- Throws:
SQLException- if a database-access error occurs, or row is 0, or result set type is TYPE_FORWARD_ONLY.
-
afterLast
JDBC 2.0Moves to the end of the result set, just after the last row. Has no effect if the result set contains no rows.
- Specified by:
afterLastin interfaceResultSet- Throws:
SQLException- if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY.
-
beforeFirst
JDBC 2.0Moves to the front of the result set, just before the first row. Has no effect if the result set contains no rows.
- Specified by:
beforeFirstin interfaceResultSet- Throws:
SQLException- if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY
-
buildIndexMapping
Builds a hash between column names and their indices for fast retrieval.- Specified by:
buildIndexMappingin interfaceResultSetInternalMethods- Throws:
SQLException
-
cancelRowUpdates
JDBC 2.0 The cancelRowUpdates() method may be called after calling an updateXXX() method(s) and before calling updateRow() to rollback the updates made to a row. If no updates have been made or updateRow() has already been called, then this method has no effect.- Specified by:
cancelRowUpdatesin interfaceResultSet- Throws:
SQLException- if a database-access error occurs, or if called when on the insert row.NotUpdatable
-
checkClosed
Ensures that the result set is not closed- Throws:
SQLException- if the result set is closed
-
checkColumnBounds
Checks if columnIndex is within the number of columns in this result set.- Parameters:
columnIndex- the index to check- Throws:
SQLException- if the index is out of bounds
-
checkRowPos
Ensures that the cursor is positioned on a valid row and that the result set is not closed- Throws:
SQLException- if the result set is not in a valid state for traversal
-
clearNextResult
public void clearNextResult()We can't do this ourselves, otherwise the contract for Statement.getMoreResults() won't work correctly.- Specified by:
clearNextResultin interfaceResultSetInternalMethods
-
clearWarnings
After this call, getWarnings returns null until a new warning is reported for this ResultSet- Specified by:
clearWarningsin interfaceResultSet- Throws:
SQLException- if a database access error occurs
-
close
In some cases, it is desirable to immediately release a ResultSet database and JDBC resources instead of waiting for this to happen when it is automatically closed. The close method provides this immediate release.Note: A ResultSet is automatically closed by the Statement the Statement that generated it when that Statement is closed, re-executed, or is used to retrieve the next result from a sequence of multiple results. A ResultSet is also automatically closed when it is garbage collected.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceResultSet- Throws:
SQLException- if a database access error occurs
-
copy
Description copied from interface:ResultSetInternalMethodsReturns a new instance of this result set, that shares the underlying row data.- Specified by:
copyin interfaceResultSetInternalMethods- Throws:
SQLException
-
redefineFieldsForDBMD
Description copied from interface:ResultSetInternalMethodsUsed by DatabaseMetadata implementations to coerce the metadata returned by metadata queries into that required by the JDBC specification.- Specified by:
redefineFieldsForDBMDin interfaceResultSetInternalMethods- Parameters:
f- 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
- Specified by:
populateCachedMetaDatain interfaceResultSetInternalMethods- Throws:
SQLException
-
initializeFromCachedMetaData
- Specified by:
initializeFromCachedMetaDatain interfaceResultSetInternalMethods
-
deleteRow
JDBC 2.0 Delete the current row from the result set and the underlying database. Cannot be called when on the insert row.- Specified by:
deleteRowin interfaceResultSet- Throws:
SQLException- if a database-access error occurs, or if called when on the insert row.NotUpdatable
-
fastDateCreate
- Throws:
SQLException
-
fastTimeCreate
- Throws:
SQLException
-
fastTimestampCreate
protected Timestamp fastTimestampCreate(Calendar cal, int year, int month, int day, int hour, int minute, int seconds, int secondsPart, boolean useGmtMillis) throws SQLException - Throws:
SQLException
-
findColumn
- Specified by:
findColumnin interfaceResultSet- Throws:
SQLException
-
first
JDBC 2.0Moves to the first row in the result set.
- Specified by:
firstin interfaceResultSet- Returns:
- true if on a valid row, false if no rows in the result set.
- Throws:
SQLException- if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY.
-
getArray
JDBC 2.0 Get an array column.- Specified by:
getArrayin interfaceResultSet- Parameters:
i- the first column is 1, the second is 2, ...- Returns:
- an object representing an SQL array
- Throws:
SQLException- if a database error occursNotImplemented
-
getArray
JDBC 2.0 Get an array column.- Specified by:
getArrayin interfaceResultSet- Parameters:
colName- the column name- Returns:
- an object representing an SQL array
- Throws:
SQLException- if a database error occursNotImplemented
-
getAsciiStream
A column value can be retrieved as a stream of ASCII characters and then read in chunks from the stream. This method is particulary suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into ASCII.Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. Also, a stream may return 0 for available() whether there is data available or not.
- Specified by:
getAsciiStreamin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- a Java InputStream that delivers the database column value as a stream of one byte ASCII characters. If the value is SQL NULL then the result is null
- Throws:
SQLException- if a database access error occurs- See Also:
-
getAsciiStream
- Specified by:
getAsciiStreamin interfaceResultSet- Parameters:
columnName-- Throws:
SQLException
-
getBigDecimal
JDBC 2.0 Get the value of a column in the current row as a java.math.BigDecimal object.- Specified by:
getBigDecimalin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value (full precision); if the value is SQL NULL, the result is null
- Throws:
SQLException- if a database-access error occurs.
-
getBigDecimal
Deprecated.Get the value of a column in the current row as a java.math.BigDecimal object- Specified by:
getBigDecimalin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2...scale- the number of digits to the right of the decimal- Returns:
- the column value; if the value is SQL NULL, null
- Throws:
SQLException- if a database access error occurs
-
getBigDecimal
JDBC 2.0 Get the value of a column in the current row as a java.math.BigDecimal object.- Specified by:
getBigDecimalin interfaceResultSet- Parameters:
columnName- the name of the column to retrieve the value from- Returns:
- the BigDecimal value in the column
- Throws:
SQLException- if an error occurs
-
getBigDecimal
Deprecated.- Specified by:
getBigDecimalin interfaceResultSet- Parameters:
columnName-scale-- Throws:
SQLException
-
getBinaryStream
A column value can also be retrieved as a binary stream. This method is suitable for retrieving LONGVARBINARY values.- Specified by:
getBinaryStreamin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2...- Returns:
- a Java InputStream that delivers the database column value as a stream of bytes. If the value is SQL NULL, then the result is null
- Throws:
SQLException- if a database access error occurs- See Also:
-
getBinaryStream
- Specified by:
getBinaryStreamin interfaceResultSet- Parameters:
columnName-- Throws:
SQLException
-
getBlob
JDBC 2.0 Get a BLOB column.- Specified by:
getBlobin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- an object representing a BLOB
- Throws:
SQLException- if an error occurs.
-
getBlob
JDBC 2.0 Get a BLOB column.- Specified by:
getBlobin interfaceResultSet- Parameters:
colName- the column name- Returns:
- an object representing a BLOB
- Throws:
SQLException- if an error occurs.
-
getBoolean
Get the value of a column in the current row as a Java boolean- Specified by:
getBooleanin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2...- Returns:
- the column value, false for SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getBoolean
- Specified by:
getBooleanin interfaceResultSet- Parameters:
columnName-- Throws:
SQLException
-
getByte
Get the value of a column in the current row as a Java byte.- Specified by:
getBytein interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2,...- Returns:
- the column value; 0 if SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getByte
- Specified by:
getBytein interfaceResultSet- Parameters:
columnName-- Throws:
SQLException
-
getBytes
Get the value of a column in the current row as a Java byte array.Be warned If the blob is huge, then you may run out of memory.
- Specified by:
getBytesin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value; if the value is SQL NULL, the result is null
- Throws:
SQLException- if a database access error occurs
-
getBytes
- Throws:
SQLException
-
getBytes
- Specified by:
getBytesin interfaceResultSet- Parameters:
columnName-- Throws:
SQLException
-
getBytesSize
- Specified by:
getBytesSizein interfaceResultSetInternalMethods- Throws:
SQLException
-
getCalendarInstanceForSessionOrNew
Optimization to only use one calendar per-session, or calculate it for each call, depending on user configuration- Throws:
SQLException
-
getCharacterStream
JDBC 2.0Get the value of a column in the current row as a java.io.Reader.
- Specified by:
getCharacterStreamin interfaceResultSet- 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
-
getCharacterStream
JDBC 2.0Get the value of a column in the current row as a java.io.Reader.
- Specified by:
getCharacterStreamin interfaceResultSet- Parameters:
columnName- the column name to retrieve the value from- Returns:
- the value as a java.io.Reader
- Throws:
SQLException- if an error occurs
-
getClob
JDBC 2.0 Get a CLOB column.- Specified by:
getClobin interfaceResultSet- Parameters:
i- the first column is 1, the second is 2, ...- Returns:
- an object representing a CLOB
- Throws:
SQLException- if an error occurs
-
getClob
JDBC 2.0 Get a CLOB column.- Specified by:
getClobin interfaceResultSet- Parameters:
colName- the column name- Returns:
- an object representing a CLOB
- Throws:
SQLException- if an error occurs
-
getConcurrency
JDBC 2.0 Return the concurrency of this result set. The concurrency used is determined by the statement that created the result set.- Specified by:
getConcurrencyin interfaceResultSet- Returns:
- the concurrency type, CONCUR_READ_ONLY, etc.
- Throws:
SQLException- if a database-access error occurs
-
getCursorName
Get the name of the SQL cursor used by this ResultSetIn SQL, a result table is retrieved though a cursor that is named. The current row of a result can be updated or deleted using a positioned update/delete statement that references the cursor name.
JDBC supports this SQL feature by providing the name of the SQL cursor used by a ResultSet. The current row of a ResulSet is also the current row of this SQL cursor.
Note: If positioned update is not supported, a SQLException is thrown.
- Specified by:
getCursorNamein interfaceResultSet- Returns:
- the ResultSet's SQL cursor name.
- Throws:
SQLException- if a database access error occurs
-
getDate
Get the value of a column in the current row as a java.sql.Date object- Specified by:
getDatein interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2...- Returns:
- the column value; null if SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getDate
JDBC 2.0 Get the value of a column in the current row as a java.sql.Date object. Use the calendar to construct an appropriate millisecond value for the Date, if the underlying database doesn't store timezone information.- Specified by:
getDatein interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...cal- the calendar to use in constructing the date- Returns:
- the column value; if the value is SQL NULL, the result is null
- Throws:
SQLException- if a database-access error occurs.
-
getDate
- Specified by:
getDatein interfaceResultSet- Parameters:
columnName-- Throws:
SQLException
-
getDate
Get the value of a column in the current row as a java.sql.Date object. Use the calendar to construct an appropriate millisecond value for the Date, if the underlying database doesn't store timezone information.- Specified by:
getDatein interfaceResultSet- Parameters:
columnName- is the SQL name of the columncal- the calendar to use in constructing the date- Returns:
- the column value; if the value is SQL NULL, the result is null
- Throws:
SQLException- if a database-access error occurs.
-
getDouble
Get the value of a column in the current row as a Java double.- Specified by:
getDoublein interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2,...- Returns:
- the column value; 0 if SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getDouble
- Specified by:
getDoublein interfaceResultSet- Parameters:
columnName-- Throws:
SQLException
-
getDoubleInternal
Converts a string representation of a number to a double. Need a faster way to do this.- Parameters:
colIndex- the 1-based index of the column to retrieve a double from.- Returns:
- the double value represented by the string in buf
- Throws:
SQLException- if an error occurs
-
getDoubleInternal
Converts a string representation of a number to a double. Need a faster way to do this.- Parameters:
stringVal- the double as a StringcolIndex- the 1-based index of the column to retrieve a double from.- Returns:
- the double value represented by the string in buf
- Throws:
SQLException- if an error occurs
-
getFetchDirection
JDBC 2.0 Returns the fetch direction for this result set.- Specified by:
getFetchDirectionin interfaceResultSet- Returns:
- the fetch direction for this result set.
- Throws:
SQLException- if a database-access error occurs
-
getFetchSize
JDBC 2.0 Return the fetch size for this result set.- Specified by:
getFetchSizein interfaceResultSet- Returns:
- the fetch size for this result set.
- Throws:
SQLException- if a database-access error occurs
-
getFirstCharOfQuery
public char getFirstCharOfQuery()Returns the first character of the query that this result set was created from.- Specified by:
getFirstCharOfQueryin interfaceResultSetInternalMethods- Returns:
- the first character of the query...uppercased
-
getFloat
Get the value of a column in the current row as a Java float.- Specified by:
getFloatin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2,...- Returns:
- the column value; 0 if SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getFloat
- Specified by:
getFloatin interfaceResultSet- Parameters:
columnName-- Throws:
SQLException
-
getInt
Get the value of a column in the current row as a Java int.- Specified by:
getIntin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2,...- Returns:
- the column value; 0 if SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getInt
- Specified by:
getIntin interfaceResultSet- Parameters:
columnName-- Throws:
SQLException
-
getLong
Get the value of a column in the current row as a Java long.- Specified by:
getLongin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2,...- Returns:
- the column value; 0 if SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getLong
- Specified by:
getLongin interfaceResultSet- Parameters:
columnName-- Throws:
SQLException
-
getMetaData
The numbers, types and properties of a ResultSet's columns are provided by the getMetaData method- Specified by:
getMetaDatain interfaceResultSet- Returns:
- a description of the ResultSet's columns
- Throws:
SQLException- if a database access error occurs
-
getNativeArray
JDBC 2.0 Get an array column.- Parameters:
i- the first column is 1, the second is 2, ...- Returns:
- an object representing an SQL array
- Throws:
SQLException- if a database error occursNotImplemented
-
getNativeAsciiStream
A column value can be retrieved as a stream of ASCII characters and then read in chunks from the stream. This method is particulary suitable for retrieving large LONGVARCHAR values. The JDBC driver will do any necessary conversion from the database format into ASCII.Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. Also, a stream may return 0 for available() whether there is data available or not.
- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- a Java InputStream that delivers the database column value as a stream of one byte ASCII characters. If the value is SQL NULL then the result is null
- Throws:
SQLException- if a database access error occurs- See Also:
-
getNativeBigDecimal
JDBC 2.0 Get the value of a column in the current row as a java.math.BigDecimal object.- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value (full precision); if the value is SQL NULL, the result is null
- Throws:
SQLException- if a database-access error occurs.
-
getNativeBigDecimal
Get the value of a column in the current row as a java.math.BigDecimal object- Parameters:
columnIndex- the first column is 1, the second is 2...scale- the number of digits to the right of the decimal- Returns:
- the column value; if the value is SQL NULL, null
- Throws:
SQLException- if a database access error occurs
-
getNativeBinaryStream
A column value can also be retrieved as a binary stream. This method is suitable for retrieving LONGVARBINARY values.- Parameters:
columnIndex- the first column is 1, the second is 2...- Returns:
- a Java InputStream that delivers the database column value as a stream of bytes. If the value is SQL NULL, then the result is null
- Throws:
SQLException- if a database access error occurs- See Also:
-
getNativeBlob
JDBC 2.0 Get a BLOB column.- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- an object representing a BLOB
- Throws:
SQLException- if an error occurs.
-
arraysEqual
public static boolean arraysEqual(byte[] left, byte[] right) -
getNativeByte
Get the value of a column in the current row as a Java byte.- Parameters:
columnIndex- the first column is 1, the second is 2,...- Returns:
- the column value; 0 if SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getNativeByte
- Throws:
SQLException
-
getNativeBytes
Get the value of a column in the current row as a Java byte array.Be warned If the blob is huge, then you may run out of memory.
- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value; if the value is SQL NULL, the result is null
- Throws:
SQLException- if a database access error occurs
-
getNativeCharacterStream
JDBC 2.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
-
getNativeClob
JDBC 2.0 Get a CLOB column.- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- an object representing a CLOB
- Throws:
SQLException- if an error occurs
-
getNativeDate
Get the value of a column in the current row as a java.sql.Date object- Parameters:
columnIndex- the first column is 1, the second is 2...- Returns:
- the column value; null if SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getNativeDate
JDBC 2.0 Get the value of a column in the current row as a java.sql.Date object. Use the calendar to construct an appropriate millisecond value for the Date, if the underlying database doesn't store timezone information.- Parameters:
columnIndex- the first column is 1, the second is 2, ...tz- the calendar to use in constructing the date- Returns:
- the column value; if the value is SQL NULL, the result is null
- Throws:
SQLException- if a database-access error occurs.
-
getNativeDateViaParseConversion
- Throws:
SQLException
-
getNativeDouble
Get the value of a column in the current row as a Java double.- Parameters:
columnIndex- the first column is 1, the second is 2,...- Returns:
- the column value; 0 if SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getNativeFloat
Get the value of a column in the current row as a Java float.- Parameters:
columnIndex- the first column is 1, the second is 2,...- Returns:
- the column value; 0 if SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getNativeInt
Get the value of a column in the current row as a Java int.- Parameters:
columnIndex- the first column is 1, the second is 2,...- Returns:
- the column value; 0 if SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getNativeInt
- Throws:
SQLException
-
getNativeLong
Get the value of a column in the current row as a Java long.- Parameters:
columnIndex- the first column is 1, the second is 2,...- Returns:
- the column value; 0 if SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getNativeLong
protected long getNativeLong(int columnIndex, boolean overflowCheck, boolean expandUnsignedLong) throws SQLException - Throws:
SQLException
-
getNativeRef
JDBC 2.0 Get a REF(<structured-type>) column.- Parameters:
i- the first column is 1, the second is 2, ...- Returns:
- an object representing data of an SQL REF type
- Throws:
SQLException- as this is not implementedNotImplemented
-
getNativeShort
Get the value of a column in the current row as a Java short.- Parameters:
columnIndex- the first column is 1, the second is 2,...- Returns:
- the column value; 0 if SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getNativeShort
- Throws:
SQLException
-
getNativeString
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
-
getNativeTimeViaParseConversion
Time getNativeTimeViaParseConversion(int columnIndex, Calendar targetCalendar, TimeZone tz, boolean rollForward) throws SQLException - Throws:
SQLException
-
getNativeTimestampViaParseConversion
Timestamp getNativeTimestampViaParseConversion(int columnIndex, Calendar targetCalendar, TimeZone tz, boolean rollForward) throws SQLException - Throws:
SQLException
-
getNativeUnicodeStream
A column value can also be retrieved as a stream of Unicode characters. We implement this as a binary stream.- Parameters:
columnIndex- the first column is 1, the second is 2...- Returns:
- a Java InputStream that delivers the database column value as a stream of two byte Unicode characters. If the value is SQL NULL, then the result is null
- Throws:
SQLException- if a database access error occurs- See Also:
-
getNativeURL
- Throws:
SQLException- See Also:
-
getNextResultSet
Description copied from interface:ResultSetInternalMethodsReturns the next ResultSet in a multi-resultset "chain", if any, null if none exists.- Specified by:
getNextResultSetin interfaceResultSetInternalMethods- Returns:
- Returns the nextResultSet, if any, null if none exists.
-
getObject
Get the value of a column in the current row as a Java objectThis method will return the value of the given column as a Java object. The type of the Java object will be the default Java Object type corresponding to the column's SQL type, following the mapping specified in the JDBC specification.
This method may also be used to read database specific abstract data types.
- Specified by:
getObjectin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2...- Returns:
- a Object holding the column value
- Throws:
SQLException- if a database access error occurs
-
getObject
- Specified by:
getObjectin interfaceResultSet- Throws:
SQLException
-
getObject
- Specified by:
getObjectin interfaceResultSet- Throws:
SQLException
-
getObject
JDBC 2.0 Returns the value of column i as a Java object. Use the map to determine the class from which to construct data of SQL structured and distinct types.- Specified by:
getObjectin interfaceResultSet- Parameters:
i- the first column is 1, the second is 2, ...map- the mapping from SQL type names to Java classes- Returns:
- an object representing the SQL value
- Throws:
SQLException- because this is not implemented
-
getObject
Get the value of a column in the current row as a Java objectThis method will return the value of the given column as a Java object. The type of the Java object will be the default Java Object type corresponding to the column's SQL type, following the mapping specified in the JDBC specification.
This method may also be used to read database specific abstract data types.
- Specified by:
getObjectin interfaceResultSet- Parameters:
columnName- is the SQL name of the column- Returns:
- a Object holding the column value
- Throws:
SQLException- if a database access error occurs
-
getObject
JDBC 2.0 Returns the value of column i as a Java object. Use the map to determine the class from which to construct data of SQL structured and distinct types.- Specified by:
getObjectin interfaceResultSet- Parameters:
colName- the column namemap- the mapping from SQL type names to Java classes- Returns:
- an object representing the SQL value
- Throws:
SQLException- as this is not implemented
-
getObjectStoredProc
Description copied from interface:ResultSetInternalMethodsFunctions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).- Specified by:
getObjectStoredProcin interfaceResultSetInternalMethods- Throws:
SQLException
-
getObjectStoredProc
public Object getObjectStoredProc(int i, Map<Object, Object> map, int desiredSqlType) throws SQLExceptionDescription copied from interface:ResultSetInternalMethodsFunctions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).- Specified by:
getObjectStoredProcin interfaceResultSetInternalMethods- Throws:
SQLException
-
getObjectStoredProc
Description copied from interface:ResultSetInternalMethodsFunctions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).- Specified by:
getObjectStoredProcin interfaceResultSetInternalMethods- Throws:
SQLException
-
getObjectStoredProc
public Object getObjectStoredProc(String colName, Map<Object, Object> map, int desiredSqlType) throws SQLExceptionDescription copied from interface:ResultSetInternalMethodsFunctions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).- Specified by:
getObjectStoredProcin interfaceResultSetInternalMethods- Throws:
SQLException
-
getRef
JDBC 2.0 Get a REF(<structured-type>) column.- Specified by:
getRefin interfaceResultSet- Parameters:
i- the first column is 1, the second is 2, ...- Returns:
- an object representing data of an SQL REF type
- Throws:
SQLException- as this is not implementedNotImplemented
-
getRef
JDBC 2.0 Get a REF(<structured-type>) column.- Specified by:
getRefin interfaceResultSet- Parameters:
colName- the column name- Returns:
- an object representing data of an SQL REF type
- Throws:
SQLException- as this method is not implemented.NotImplemented
-
getRow
JDBC 2.0Determine the current row number. The first row is number 1, the second number 2, etc.
- Specified by:
getRowin interfaceResultSet- Returns:
- the current row number, else return 0 if there is no current row
- Throws:
SQLException- if a database-access error occurs.
-
getServerInfo
Returns the server info (if any), or null if none.- Specified by:
getServerInfoin interfaceResultSetInternalMethods- Returns:
- server info created for this ResultSet
-
getShort
Get the value of a column in the current row as a Java short.- Specified by:
getShortin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2,...- Returns:
- the column value; 0 if SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getShort
- Specified by:
getShortin interfaceResultSet- Parameters:
columnName-- Throws:
SQLException
-
getStatement
JDBC 2.0 Return the Statement that produced the ResultSet.- Specified by:
getStatementin interfaceResultSet- Returns:
- the Statment that produced the result set, or null if the result was produced some other way.
- Throws:
SQLException- if a database-access error occurs
-
getString
Get the value of a column in the current row as a Java String- Specified by:
getStringin interfaceResultSet- 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
-
getString
The following routines simply convert the columnName into a columnIndex and then call the appropriate routine above.- Specified by:
getStringin interfaceResultSet- Parameters:
columnName- is the SQL name of the column- Returns:
- the column value
- Throws:
SQLException- if a database access error occurs
-
getStringInternal
- Throws:
SQLException
-
getTime
Get the value of a column in the current row as a java.sql.Time object- Specified by:
getTimein interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2...- Returns:
- the column value; null if SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getTime
Get the value of a column in the current row as a java.sql.Time object. Use the calendar to construct an appropriate millisecond value for the Time, if the underlying database doesn't store timezone information.- Specified by:
getTimein interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...cal- the calendar to use in constructing the time- Returns:
- the column value; if the value is SQL NULL, the result is null
- Throws:
SQLException- if a database-access error occurs.
-
getTime
Get the value of a column in the current row as a java.sql.Time object.- Specified by:
getTimein interfaceResultSet- Parameters:
columnName- is the SQL name of the column- Returns:
- the column value; if the value is SQL NULL, the result is null
- Throws:
SQLException- if a database-access error occurs.
-
getTime
Get the value of a column in the current row as a java.sql.Time object. Use the calendar to construct an appropriate millisecond value for the Time, if the underlying database doesn't store timezone information.- Specified by:
getTimein interfaceResultSet- Parameters:
columnName- is the SQL name of the columncal- the calendar to use in constructing the time- Returns:
- the column value; if the value is SQL NULL, the result is null
- Throws:
SQLException- if a database-access error occurs.
-
getTimestamp
Get the value of a column in the current row as a java.sql.Timestamp object- Specified by:
getTimestampin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2...- Returns:
- the column value; null if SQL NULL
- Throws:
SQLException- if a database access error occurs
-
getTimestamp
Get the value of a column in the current row as a java.sql.Timestamp object. Use the calendar to construct an appropriate millisecond value for the Timestamp, if the underlying database doesn't store timezone information.- Specified by:
getTimestampin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...cal- the calendar to use in constructing the timestamp- Returns:
- the column value; if the value is SQL NULL, the result is null
- Throws:
SQLException- if a database-access error occurs.
-
getTimestamp
- Specified by:
getTimestampin interfaceResultSet- Parameters:
columnName-- Throws:
SQLException
-
getTimestamp
Get the value of a column in the current row as a java.sql.Timestamp object. Use the calendar to construct an appropriate millisecond value for the Timestamp, if the underlying database doesn't store timezone information.- Specified by:
getTimestampin interfaceResultSet- Parameters:
columnName- is the SQL name of the columncal- the calendar to use in constructing the timestamp- Returns:
- the column value; if the value is SQL NULL, the result is null
- Throws:
SQLException- if a database-access error occurs.
-
getType
JDBC 2.0 Return the type of this result set. The type is determined based on the statement that created the result set.- Specified by:
getTypein interfaceResultSet- Returns:
- TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, or TYPE_SCROLL_SENSITIVE
- Throws:
SQLException- if a database-access error occurs
-
getUnicodeStream
Deprecated.A column value can also be retrieved as a stream of Unicode characters. We implement this as a binary stream.- Specified by:
getUnicodeStreamin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2...- Returns:
- a Java InputStream that delivers the database column value as a stream of two byte Unicode characters. If the value is SQL NULL, then the result is null
- Throws:
SQLException- if a database access error occurs- See Also:
-
getUnicodeStream
Deprecated.- Specified by:
getUnicodeStreamin interfaceResultSet- Parameters:
columnName-- Throws:
SQLException
-
getUpdateCount
public long getUpdateCount()Description copied from interface:ResultSetInternalMethodsReturns the update count for this result set (if one exists), otherwise -1.- Specified by:
getUpdateCountin interfaceResultSetInternalMethods
-
getUpdateID
public long getUpdateID()Description copied from interface:ResultSetInternalMethodsReturns the AUTO_INCREMENT value for the DDL/DML statement which created this result set.- Specified by:
getUpdateIDin interfaceResultSetInternalMethods- Returns:
- the AUTO_INCREMENT value for the DDL/DML statement which created this result set.
-
getURL
- Specified by:
getURLin interfaceResultSet- Throws:
SQLException- See Also:
-
getURL
- Specified by:
getURLin interfaceResultSet- Throws:
SQLException- See Also:
-
getWarnings
The first warning reported by calls on this ResultSet is returned. Subsequent ResultSet warnings will be chained to this java.sql.SQLWarning.The warning chain is automatically cleared each time a new row is read.
Note: This warning chain only covers warnings caused by ResultSet methods. Any warnings caused by statement methods (such as reading OUT parameters) will be chained on the Statement object.
- Specified by:
getWarningsin interfaceResultSet- Returns:
- the first java.sql.SQLWarning or null;
- Throws:
SQLException- if a database access error occurs.
-
insertRow
JDBC 2.0 Insert the contents of the insert row into the result set and the database. Must be on the insert row when this method is called.- Specified by:
insertRowin interfaceResultSet- Throws:
SQLException- if a database-access error occurs, if called when not on the insert row, or if all non-nullable columns in the insert row have not been given a valueNotUpdatable
-
isAfterLast
JDBC 2.0Determine if the cursor is after the last row in the result set.
- Specified by:
isAfterLastin interfaceResultSet- Returns:
- true if after the last row, false otherwise. Returns false when the result set contains no rows.
- Throws:
SQLException- if a database-access error occurs.
-
isBeforeFirst
JDBC 2.0Determine if the cursor is before the first row in the result set.
- Specified by:
isBeforeFirstin interfaceResultSet- Returns:
- true if before the first row, false otherwise. Returns false when the result set contains no rows.
- Throws:
SQLException- if a database-access error occurs.
-
isFirst
JDBC 2.0Determine if the cursor is on the first row of the result set.
- Specified by:
isFirstin interfaceResultSet- Returns:
- true if on the first row, false otherwise.
- Throws:
SQLException- if a database-access error occurs.
-
isLast
JDBC 2.0Determine if the cursor is on the last row of the result set. Note: Calling isLast() may be expensive since the JDBC driver might need to fetch ahead one row in order to determine whether the current row is the last row in the result set.
- Specified by:
isLastin interfaceResultSet- Returns:
- true if on the last row, false otherwise.
- Throws:
SQLException- if a database-access error occurs.
-
last
JDBC 2.0Moves to the last row in the result set.
- Specified by:
lastin interfaceResultSet- Returns:
- true if on a valid row, false if no rows in the result set.
- Throws:
SQLException- if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY.
-
moveToCurrentRow
JDBC 2.0 Move the cursor to the remembered cursor position, usually the current row. Has no effect unless the cursor is on the insert row.- Specified by:
moveToCurrentRowin interfaceResultSet- Throws:
SQLException- if a database-access error occurs, or the result set is not updatableNotUpdatable
-
moveToInsertRow
JDBC 2.0 Move to the insert row. The current cursor position is remembered while the cursor is positioned on the insert row. The insert row is a special row associated with an updatable result set. It is essentially a buffer where a new row may be constructed by calling the updateXXX() methods prior to inserting the row into the result set. Only the updateXXX(), getXXX(), and insertRow() methods may be called when the cursor is on the insert row. All of the columns in a result set must be given a value each time this method is called before calling insertRow(). UpdateXXX()must be called before getXXX() on a column.- Specified by:
moveToInsertRowin interfaceResultSet- Throws:
SQLException- if a database-access error occurs, or the result set is not updatableNotUpdatable
-
next
A ResultSet is initially positioned before its first row, the first call to next makes the first row the current row; the second call makes the second row the current row, etc.If an input stream from the previous row is open, it is implicitly closed. The ResultSet's warning chain is cleared when a new row is read
- Specified by:
nextin interfaceResultSet- Returns:
- true if the new current is valid; false if there are no more rows
- Throws:
SQLException- if a database access error occurs
-
prev
The prev method is not part of JDBC, but because of the architecture of this driver it is possible to move both forward and backward within the result set.If an input stream from the previous row is open, it is implicitly closed. The ResultSet's warning chain is cleared when a new row is read
- Returns:
- true if the new current is valid; false if there are no more rows
- Throws:
SQLException- if a database access error occurs
-
previous
JDBC 2.0Moves to the previous row in the result set.
Note: previous() is not the same as relative(-1) since it makes sense to call previous() when there is no current row.
- Specified by:
previousin interfaceResultSet- Returns:
- true if on a valid row, false if off the result set.
- Throws:
SQLException- if a database-access error occurs, or result set type is TYPE_FORWAR_DONLY.
-
realClose
Closes this ResultSet and releases resources.- Specified by:
realClosein interfaceResultSetInternalMethods- Parameters:
calledExplicitly- was realClose called by the standard ResultSet.close() method, or was it closed internally by the driver?- Throws:
SQLException- if an error occurs
-
isClosed
Returns true if this ResultSet is closed.- Specified by:
isClosedin interfaceResultSet- Specified by:
isClosedin interfaceResultSetInternalMethods- Throws:
SQLException
-
reallyResult
public boolean reallyResult()Description copied from interface:ResultSetInternalMethodsDoes the result set contain rows, or is it the result of a DDL or DML statement?- Specified by:
reallyResultin interfaceResultSetInternalMethods
-
refreshRow
JDBC 2.0 Refresh the value of the current row with its current value in the database. Cannot be called when on the insert row. The refreshRow() method provides a way for an application to explicitly tell the JDBC driver to refetch a row(s) from the database. An application may want to call refreshRow() when caching or prefetching is being done by the JDBC driver to fetch the latest value of a row from the database. The JDBC driver may actually refresh multiple rows at once if the fetch size is greater than one. All values are refetched subject to the transaction isolation level and cursor sensitivity. If refreshRow() is called after calling updateXXX(), but before calling updateRow() then the updates made to the row are lost. Calling refreshRow() frequently will likely slow performance.- Specified by:
refreshRowin interfaceResultSet- Throws:
SQLException- if a database-access error occurs, or if called when on the insert row.NotUpdatable
-
relative
JDBC 2.0Moves a relative number of rows, either positive or negative. Attempting to move beyond the first/last row in the result set positions the cursor before/after the the first/last row. Calling relative(0) is valid, but does not change the cursor position.
Note: Calling relative(1) is different than calling next() since is makes sense to call next() when there is no current row, for example, when the cursor is positioned before the first row or after the last row of the result set.
- Specified by:
relativein interfaceResultSet- Parameters:
rows- the number of relative rows to move the cursor.- Returns:
- true if on a row, false otherwise.
- Throws:
SQLException- if a database-access error occurs, or there is no current row, or result set type is TYPE_FORWARD_ONLY.
-
rowDeleted
JDBC 2.0 Determine if this row has been deleted. A deleted row may leave a visible "hole" in a result set. This method can be used to detect holes in a result set. The value returned depends on whether or not the result set can detect deletions.- Specified by:
rowDeletedin interfaceResultSet- Returns:
- true if deleted and deletes are detected
- Throws:
SQLException- if a database-access error occursNotImplemented- See Also:
-
rowInserted
JDBC 2.0 Determine if the current row has been inserted. The value returned depends on whether or not the result set can detect visible inserts.- Specified by:
rowInsertedin interfaceResultSet- Returns:
- true if inserted and inserts are detected
- Throws:
SQLException- if a database-access error occursNotImplemented- See Also:
-
rowUpdated
JDBC 2.0 Determine if the current row has been updated. The value returned depends on whether or not the result set can detect updates.- Specified by:
rowUpdatedin interfaceResultSet- Returns:
- true if the row has been visibly updated by the owner or another, and updates are detected
- Throws:
SQLException- if a database-access error occursNotImplemented- See Also:
-
setBinaryEncoded
protected void setBinaryEncoded()Flag that this result set is 'binary' encoded (from a PreparedStatement), not stored as strings. -
setFetchDirection
JDBC 2.0 Give a hint as to the direction in which the rows in this result set will be processed. The initial value is determined by the statement that produced the result set. The fetch direction may be changed at any time.- Specified by:
setFetchDirectionin interfaceResultSet- Parameters:
direction- the direction to fetch rows in.- Throws:
SQLException- if a database-access error occurs, or the result set type is TYPE_FORWARD_ONLY and direction is not FETCH_FORWARD. MM.MySQL actually ignores this, because it has the whole result set anyway, so the direction is immaterial.
-
setFetchSize
JDBC 2.0 Give the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this result set. If the fetch size specified is zero, then the JDBC driver ignores the value, and is free to make its own best guess as to what the fetch size should be. The default value is set by the statement that creates the result set. The fetch size may be changed at any time.- Specified by:
setFetchSizein interfaceResultSet- Parameters:
rows- the number of rows to fetch- Throws:
SQLException- if a database-access error occurs, or the condition 0 lteq rows lteq this.getMaxRows() is not satisfied. Currently ignored by this driver.
-
setFirstCharOfQuery
public void setFirstCharOfQuery(char c) Sets the first character of the query that this result set was created from.- Specified by:
setFirstCharOfQueryin interfaceResultSetInternalMethods- Parameters:
c- the first character of the query...uppercased
-
setNextResultSet
- Parameters:
nextResultSet- Sets the next result set in the result set chain for multiple result sets.
-
setOwningStatement
Description copied from interface:ResultSetInternalMethodsSets the statement that "owns" this result set (usually used when the result set should internally "belong" to one statement, but is created by another.- Specified by:
setOwningStatementin interfaceResultSetInternalMethods
-
setResultSetConcurrency
protected void setResultSetConcurrency(int concurrencyFlag) Sets the concurrency (JDBC2)- Parameters:
concurrencyFlag- CONCUR_UPDATABLE or CONCUR_READONLY
-
setResultSetType
protected void setResultSetType(int typeFlag) Sets the result set type for (JDBC2)- Parameters:
typeFlag- SCROLL_SENSITIVE or SCROLL_INSENSITIVE (we only support SCROLL_INSENSITIVE)
-
setServerInfo
Sets server info (if any)- Parameters:
info- the server info message
-
setStatementUsedForFetchingRows
- Specified by:
setStatementUsedForFetchingRowsin interfaceResultSetInternalMethods
-
setWrapperStatement
- Specified by:
setWrapperStatementin interfaceResultSetInternalMethods- Parameters:
wrapperStatement- The wrapperStatement to set.
-
toString
-
updateArray
- Specified by:
updateArrayin interfaceResultSet- Throws:
SQLException- See Also:
-
updateArray
- Specified by:
updateArrayin interfaceResultSet- Throws:
SQLException- See Also:
-
updateAsciiStream
JDBC 2.0 Update a column with an ascii 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.- Specified by:
updateAsciiStreamin interfaceResultSet- 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
-
updateAsciiStream
JDBC 2.0 Update a column with an ascii 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.- Specified by:
updateAsciiStreamin interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column valuelength- of the stream- Throws:
SQLException- if a database-access error occurs
-
updateBigDecimal
JDBC 2.0 Update a column with a BigDecimal 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.- Specified by:
updateBigDecimalin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...x- the new column value- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateBigDecimal
JDBC 2.0 Update a column with a BigDecimal 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.- Specified by:
updateBigDecimalin interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column value- Throws:
SQLException- if a database-access error occurs
-
updateBinaryStream
JDBC 2.0 Update a column with a binary 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.- Specified by:
updateBinaryStreamin interfaceResultSet- 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
-
updateBinaryStream
JDBC 2.0 Update a column with a binary 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.- Specified by:
updateBinaryStreamin interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column valuelength- of the stream- Throws:
SQLException- if a database-access error occurs
-
updateBlob
- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException- See Also:
-
updateBlob
- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException- See Also:
-
updateBoolean
JDBC 2.0 Update a column with a boolean 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.- Specified by:
updateBooleanin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...x- the new column value- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateBoolean
JDBC 2.0 Update a column with a boolean 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.- Specified by:
updateBooleanin interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column value- Throws:
SQLException- if a database-access error occurs
-
updateByte
JDBC 2.0 Update a column with a byte 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.- Specified by:
updateBytein interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...x- the new column value- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateByte
JDBC 2.0 Update a column with a byte 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.- Specified by:
updateBytein interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column value- Throws:
SQLException- if a database-access error occurs
-
updateBytes
JDBC 2.0 Update a column with a byte array 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.- Specified by:
updateBytesin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...x- the new column value- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateBytes
JDBC 2.0 Update a column with a byte array 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.- Specified by:
updateBytesin interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column value- Throws:
SQLException- if a database-access error occurs
-
updateCharacterStream
JDBC 2.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.- Specified by:
updateCharacterStreamin interfaceResultSet- 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
-
updateCharacterStream
JDBC 2.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.- Specified by:
updateCharacterStreamin interfaceResultSet- 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
-
updateClob
- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException- See Also:
-
updateClob
- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException- See Also:
-
updateDate
JDBC 2.0 Update a column with a Date 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.- Specified by:
updateDatein interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...x- the new column value- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateDate
JDBC 2.0 Update a column with a Date 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.- Specified by:
updateDatein interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column value- Throws:
SQLException- if a database-access error occurs
-
updateDouble
JDBC 2.0 Update a column with a Double 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.- Specified by:
updateDoublein interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...x- the new column value- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateDouble
JDBC 2.0 Update a column with a double 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.- Specified by:
updateDoublein interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column value- Throws:
SQLException- if a database-access error occurs
-
updateFloat
JDBC 2.0 Update a column with a float 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.- Specified by:
updateFloatin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...x- the new column value- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateFloat
JDBC 2.0 Update a column with a float 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.- Specified by:
updateFloatin interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column value- Throws:
SQLException- if a database-access error occurs
-
updateInt
JDBC 2.0 Update a column with an integer 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.- Specified by:
updateIntin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...x- the new column value- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateInt
JDBC 2.0 Update a column with an integer 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.- Specified by:
updateIntin interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column value- Throws:
SQLException- if a database-access error occurs
-
updateLong
JDBC 2.0 Update a column with a long 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.- Specified by:
updateLongin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...x- the new column value- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateLong
JDBC 2.0 Update a column with a long 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.- Specified by:
updateLongin interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column value- Throws:
SQLException- if a database-access error occurs
-
updateNull
JDBC 2.0 Give a nullable column a null 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.- Specified by:
updateNullin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateNull
JDBC 2.0 Update a column with a null 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.- Specified by:
updateNullin interfaceResultSet- Parameters:
columnName- the name of the column- Throws:
SQLException- if a database-access error occurs
-
updateObject
JDBC 2.0 Update a column with an Object 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.- Specified by:
updateObjectin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...x- the new column value- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateObject
JDBC 2.0 Update a column with an Object 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.- Specified by:
updateObjectin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...x- the new column valuescale- For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types this is the number of digits after the decimal. For all other types this value will be ignored.- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateObject
JDBC 2.0 Update a column with an Object 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.- Specified by:
updateObjectin interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column value- Throws:
SQLException- if a database-access error occurs
-
updateObject
JDBC 2.0 Update a column with an Object 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.- Specified by:
updateObjectin interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column valuescale- For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types this is the number of digits after the decimal. For all other types this value will be ignored.- Throws:
SQLException- if a database-access error occurs
-
updateRef
- Specified by:
updateRefin interfaceResultSet- Throws:
SQLException- See Also:
-
updateRef
- Specified by:
updateRefin interfaceResultSet- Throws:
SQLException- See Also:
-
updateRow
JDBC 2.0 Update the underlying database with the new contents of the current row. Cannot be called when on the insert row.- Specified by:
updateRowin interfaceResultSet- Throws:
SQLException- if a database-access error occurs, or if called when on the insert rowNotUpdatable
-
updateShort
JDBC 2.0 Update a column with a short 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.- Specified by:
updateShortin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...x- the new column value- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateShort
JDBC 2.0 Update a column with a short 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.- Specified by:
updateShortin interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column value- Throws:
SQLException- if a database-access error occurs
-
updateString
JDBC 2.0 Update a column with a String 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.- Specified by:
updateStringin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...x- the new column value- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateString
JDBC 2.0 Update a column with a String 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.- Specified by:
updateStringin interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column value- Throws:
SQLException- if a database-access error occurs
-
updateTime
JDBC 2.0 Update a column with a Time 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.- Specified by:
updateTimein interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...x- the new column value- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateTime
JDBC 2.0 Update a column with a Time 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.- Specified by:
updateTimein interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column value- Throws:
SQLException- if a database-access error occurs
-
updateTimestamp
JDBC 2.0 Update a column with a Timestamp 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.- Specified by:
updateTimestampin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...x- the new column value- Throws:
SQLException- if a database-access error occursNotUpdatable
-
updateTimestamp
JDBC 2.0 Update a column with a Timestamp 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.- Specified by:
updateTimestampin interfaceResultSet- Parameters:
columnName- the name of the columnx- the new column value- Throws:
SQLException- if a database-access error occurs
-
wasNull
A column may have the value of SQL NULL; wasNull() reports whether the last column read had this special value. Note that you must first call getXXX on a column to try to read its value and then call wasNull() to find if the value was SQL NULL- Specified by:
wasNullin interfaceResultSet- Returns:
- true if the last column read was SQL NULL
- Throws:
SQLException- if a database access error occurred
-
getGmtCalendar
-
getExceptionInterceptor
-
getId
public int getId()- Specified by:
getIdin interfaceResultSetInternalMethods
-