Class ResultSetImpl

java.lang.Object
com.mysql.jdbc.ResultSetImpl
All Implemented Interfaces:
ResultSetInternalMethods, AutoCloseable, ResultSet, Wrapper
Direct Known Subclasses:
JDBC4ResultSet, UpdatableResultSet

public class ResultSetImpl extends Object implements ResultSetInternalMethods
A ResultSet provides access to a table of data generated by executing a Statement. The table rows are retrieved in sequence. Within a row its column values can be accessed in any order.

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 Details

    • MIN_DIFF_PREC

      protected static final double MIN_DIFF_PREC
      Epsillon between Float.MIN_VALUE and the double representation of said value.
    • MAX_DIFF_PREC

      protected static final double MAX_DIFF_PREC
      Epsillon between Float.MAX_VALUE and the double representation of said value.
    • resultCounter

      static int resultCounter
      Counter used to generate IDs for profiling.
    • catalog

      protected String catalog
      The catalog that was in use when we were created
    • columnLabelToIndex

      protected Map<String,Integer> columnLabelToIndex
      Map column names (and all of their permutations) to column indices
    • columnToIndexCache

      protected Map<String,Integer> columnToIndexCache
      The 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()....
    • columnUsed

      protected boolean[] columnUsed
      Keep track of columns accessed
    • connection

      protected volatile MySQLConnection connection
      The Connection instance that created us
    • currentRow

      protected int currentRow
      The current row #, -1 == before start of result set
    • doingUpdates

      protected boolean doingUpdates
      Are we in the middle of doing updates to the current row?
    • fastDefaultCal

      Calendar fastDefaultCal
    • fastClientCal

      Calendar fastClientCal
    • fetchDirection

      protected int fetchDirection
      The direction to fetch rows (always FETCH_FORWARD)
    • fetchSize

      protected int fetchSize
      The number of rows to fetch in one go...
    • fields

      protected Field[] fields
      The fields for this result set
    • firstCharOfQuery

      protected char firstCharOfQuery
      First character of the query that created this result set...Used to determine whether or not to parse server info messages in certain circumstances.
    • fullColumnNameToIndex

      protected Map<String,Integer> fullColumnNameToIndex
      Map of fully-specified column names to column indices
    • columnNameToIndex

      protected Map<String,Integer> columnNameToIndex
    • hasBuiltIndexMapping

      protected boolean hasBuiltIndexMapping
    • isBinaryEncoded

      protected boolean isBinaryEncoded
      Is the data stored as strings (default) or natively (which is the case with results from PrepStmts)
    • isClosed

      protected boolean isClosed
      Has this result set been closed?
    • nextResultSet

      protected ResultSetInternalMethods nextResultSet
    • onInsertRow

      protected boolean onInsertRow
      Are we on the insert row?
    • owningStatement

      protected StatementImpl owningStatement
      The statement that created us
    • pointOfOrigin

      protected String pointOfOrigin
      StackTrace generated where ResultSet was created... used when profiling
    • reallyResult

      protected boolean reallyResult
      Do we actually contain rows, or just information about UPDATE/INSERT/DELETE?
    • resultId

      protected int resultId
      The id (used when profiling) to identify us
    • resultSetConcurrency

      protected int resultSetConcurrency
      Are we read-only or updatable?
    • resultSetType

      protected int resultSetType
      Are we scroll-sensitive/insensitive?
    • rowData

      protected RowData rowData
      The actual rows
    • serverInfo

      protected String 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

      protected ResultSetRow thisRow
      Pointer to current row data
    • updateCount

      protected long updateCount
      How many rows were affected by UPDATE/INSERT/DELETE?
    • updateId

      protected long updateId
      Value generated for AUTO_INCREMENT columns
    • useUsageAdvisor

      protected boolean useUsageAdvisor
    • warningChain

      protected SQLWarning warningChain
      The warning chain
    • wasNullFlag

      protected boolean wasNullFlag
      Did the previous value retrieval find a NULL?
    • wrapperStatement

      protected Statement wrapperStatement
    • retainOwningStatement

      protected boolean retainOwningStatement
    • gmtCalendar

      protected Calendar 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 update
      updateID - 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 created
      fields - an array of Field objects (basically, the ResultSet MetaData)
      tuples - actual row data
      conn - the Connection that created us.
      creatorStmt -
      Throws:
      SQLException - if an error occurs
  • Method Details

    • convertLongToUlong

      protected static BigInteger convertLongToUlong(long longVal)
      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

      public void initializeWithMetadata() throws SQLException
      Specified by:
      initializeWithMetadata in interface ResultSetInternalMethods
      Throws:
      SQLException
    • absolute

      public boolean absolute(int row) throws SQLException
      JDBC 2.0

      Move 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:
      absolute in interface ResultSet
      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

      public void afterLast() throws SQLException
      JDBC 2.0

      Moves to the end of the result set, just after the last row. Has no effect if the result set contains no rows.

      Specified by:
      afterLast in interface ResultSet
      Throws:
      SQLException - if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY.
    • beforeFirst

      public void beforeFirst() throws SQLException
      JDBC 2.0

      Moves to the front of the result set, just before the first row. Has no effect if the result set contains no rows.

      Specified by:
      beforeFirst in interface ResultSet
      Throws:
      SQLException - if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY
    • buildIndexMapping

      public void buildIndexMapping() throws SQLException
      Builds a hash between column names and their indices for fast retrieval.
      Specified by:
      buildIndexMapping in interface ResultSetInternalMethods
      Throws:
      SQLException
    • cancelRowUpdates

      public void cancelRowUpdates() throws SQLException
      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:
      cancelRowUpdates in interface ResultSet
      Throws:
      SQLException - if a database-access error occurs, or if called when on the insert row.
      NotUpdatable
    • checkClosed

      protected final MySQLConnection checkClosed() throws SQLException
      Ensures that the result set is not closed
      Throws:
      SQLException - if the result set is closed
    • checkColumnBounds

      protected final void checkColumnBounds(int columnIndex) throws SQLException
      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

      protected void checkRowPos() throws SQLException
      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:
      clearNextResult in interface ResultSetInternalMethods
    • clearWarnings

      public void clearWarnings() throws SQLException
      After this call, getWarnings returns null until a new warning is reported for this ResultSet
      Specified by:
      clearWarnings in interface ResultSet
      Throws:
      SQLException - if a database access error occurs
    • close

      public void close() throws SQLException
      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:
      close in interface AutoCloseable
      Specified by:
      close in interface ResultSet
      Throws:
      SQLException - if a database access error occurs
    • copy

      public ResultSetInternalMethods copy() throws SQLException
      Description copied from interface: ResultSetInternalMethods
      Returns a new instance of this result set, that shares the underlying row data.
      Specified by:
      copy in interface ResultSetInternalMethods
      Throws:
      SQLException
    • redefineFieldsForDBMD

      public void redefineFieldsForDBMD(Field[] f)
      Description copied from interface: ResultSetInternalMethods
      Used by DatabaseMetadata implementations to coerce the metadata returned by metadata queries into that required by the JDBC specification.
      Specified by:
      redefineFieldsForDBMD in interface ResultSetInternalMethods
      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

      public void populateCachedMetaData(CachedResultSetMetaData cachedMetaData) throws SQLException
      Specified by:
      populateCachedMetaData in interface ResultSetInternalMethods
      Throws:
      SQLException
    • initializeFromCachedMetaData

      public void initializeFromCachedMetaData(CachedResultSetMetaData cachedMetaData)
      Specified by:
      initializeFromCachedMetaData in interface ResultSetInternalMethods
    • deleteRow

      public void deleteRow() throws SQLException
      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:
      deleteRow in interface ResultSet
      Throws:
      SQLException - if a database-access error occurs, or if called when on the insert row.
      NotUpdatable
    • fastDateCreate

      protected Date fastDateCreate(Calendar cal, int year, int month, int day) throws SQLException
      Throws:
      SQLException
    • fastTimeCreate

      protected Time fastTimeCreate(Calendar cal, int hour, int minute, int second) throws SQLException
      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

      public int findColumn(String columnName) throws SQLException
      Specified by:
      findColumn in interface ResultSet
      Throws:
      SQLException
    • first

      public boolean first() throws SQLException
      JDBC 2.0

      Moves to the first row in the result set.

      Specified by:
      first in interface ResultSet
      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

      public Array getArray(int i) throws SQLException
      JDBC 2.0 Get an array column.
      Specified by:
      getArray in interface ResultSet
      Parameters:
      i - the first column is 1, the second is 2, ...
      Returns:
      an object representing an SQL array
      Throws:
      SQLException - if a database error occurs
      NotImplemented
    • getArray

      public Array getArray(String colName) throws SQLException
      JDBC 2.0 Get an array column.
      Specified by:
      getArray in interface ResultSet
      Parameters:
      colName - the column name
      Returns:
      an object representing an SQL array
      Throws:
      SQLException - if a database error occurs
      NotImplemented
    • getAsciiStream

      public InputStream getAsciiStream(int columnIndex) throws SQLException
      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:
      getAsciiStream in interface ResultSet
      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

      public InputStream getAsciiStream(String columnName) throws SQLException
      Specified by:
      getAsciiStream in interface ResultSet
      Parameters:
      columnName -
      Throws:
      SQLException
    • getBigDecimal

      public BigDecimal getBigDecimal(int columnIndex) throws SQLException
      JDBC 2.0 Get the value of a column in the current row as a java.math.BigDecimal object.
      Specified by:
      getBigDecimal in interface ResultSet
      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 public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
      Deprecated.
      Get the value of a column in the current row as a java.math.BigDecimal object
      Specified by:
      getBigDecimal in interface ResultSet
      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

      public BigDecimal getBigDecimal(String columnName) throws SQLException
      JDBC 2.0 Get the value of a column in the current row as a java.math.BigDecimal object.
      Specified by:
      getBigDecimal in interface ResultSet
      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 public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException
      Deprecated.
      Specified by:
      getBigDecimal in interface ResultSet
      Parameters:
      columnName -
      scale -
      Throws:
      SQLException
    • getBinaryStream

      public InputStream getBinaryStream(int columnIndex) throws SQLException
      A column value can also be retrieved as a binary stream. This method is suitable for retrieving LONGVARBINARY values.
      Specified by:
      getBinaryStream in interface ResultSet
      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

      public InputStream getBinaryStream(String columnName) throws SQLException
      Specified by:
      getBinaryStream in interface ResultSet
      Parameters:
      columnName -
      Throws:
      SQLException
    • getBlob

      public Blob getBlob(int columnIndex) throws SQLException
      JDBC 2.0 Get a BLOB column.
      Specified by:
      getBlob in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      Returns:
      an object representing a BLOB
      Throws:
      SQLException - if an error occurs.
    • getBlob

      public Blob getBlob(String colName) throws SQLException
      JDBC 2.0 Get a BLOB column.
      Specified by:
      getBlob in interface ResultSet
      Parameters:
      colName - the column name
      Returns:
      an object representing a BLOB
      Throws:
      SQLException - if an error occurs.
    • getBoolean

      public boolean getBoolean(int columnIndex) throws SQLException
      Get the value of a column in the current row as a Java boolean
      Specified by:
      getBoolean in interface ResultSet
      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

      public boolean getBoolean(String columnName) throws SQLException
      Specified by:
      getBoolean in interface ResultSet
      Parameters:
      columnName -
      Throws:
      SQLException
    • getByte

      public byte getByte(int columnIndex) throws SQLException
      Get the value of a column in the current row as a Java byte.
      Specified by:
      getByte in interface ResultSet
      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

      public byte getByte(String columnName) throws SQLException
      Specified by:
      getByte in interface ResultSet
      Parameters:
      columnName -
      Throws:
      SQLException
    • getBytes

      public byte[] getBytes(int columnIndex) throws SQLException
      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:
      getBytes in interface ResultSet
      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

      protected byte[] getBytes(int columnIndex, boolean noConversion) throws SQLException
      Throws:
      SQLException
    • getBytes

      public byte[] getBytes(String columnName) throws SQLException
      Specified by:
      getBytes in interface ResultSet
      Parameters:
      columnName -
      Throws:
      SQLException
    • getBytesSize

      public int getBytesSize() throws SQLException
      Specified by:
      getBytesSize in interface ResultSetInternalMethods
      Throws:
      SQLException
    • getCalendarInstanceForSessionOrNew

      protected Calendar getCalendarInstanceForSessionOrNew() throws SQLException
      Optimization to only use one calendar per-session, or calculate it for each call, depending on user configuration
      Throws:
      SQLException
    • getCharacterStream

      public Reader getCharacterStream(int columnIndex) throws SQLException
      JDBC 2.0

      Get the value of a column in the current row as a java.io.Reader.

      Specified by:
      getCharacterStream in interface ResultSet
      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

      public Reader getCharacterStream(String columnName) throws SQLException
      JDBC 2.0

      Get the value of a column in the current row as a java.io.Reader.

      Specified by:
      getCharacterStream in interface ResultSet
      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

      public Clob getClob(int i) throws SQLException
      JDBC 2.0 Get a CLOB column.
      Specified by:
      getClob in interface ResultSet
      Parameters:
      i - the first column is 1, the second is 2, ...
      Returns:
      an object representing a CLOB
      Throws:
      SQLException - if an error occurs
    • getClob

      public Clob getClob(String colName) throws SQLException
      JDBC 2.0 Get a CLOB column.
      Specified by:
      getClob in interface ResultSet
      Parameters:
      colName - the column name
      Returns:
      an object representing a CLOB
      Throws:
      SQLException - if an error occurs
    • getConcurrency

      public int getConcurrency() throws SQLException
      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:
      getConcurrency in interface ResultSet
      Returns:
      the concurrency type, CONCUR_READ_ONLY, etc.
      Throws:
      SQLException - if a database-access error occurs
    • getCursorName

      public String getCursorName() throws SQLException
      Get the name of the SQL cursor used by this ResultSet

      In 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:
      getCursorName in interface ResultSet
      Returns:
      the ResultSet's SQL cursor name.
      Throws:
      SQLException - if a database access error occurs
    • getDate

      public Date getDate(int columnIndex) throws SQLException
      Get the value of a column in the current row as a java.sql.Date object
      Specified by:
      getDate in interface ResultSet
      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

      public Date getDate(int columnIndex, Calendar cal) throws SQLException
      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:
      getDate in interface ResultSet
      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

      public Date getDate(String columnName) throws SQLException
      Specified by:
      getDate in interface ResultSet
      Parameters:
      columnName -
      Throws:
      SQLException
    • getDate

      public Date getDate(String columnName, Calendar cal) throws SQLException
      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:
      getDate in interface ResultSet
      Parameters:
      columnName - is the SQL name of the column
      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.
    • getDouble

      public double getDouble(int columnIndex) throws SQLException
      Get the value of a column in the current row as a Java double.
      Specified by:
      getDouble in interface ResultSet
      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

      public double getDouble(String columnName) throws SQLException
      Specified by:
      getDouble in interface ResultSet
      Parameters:
      columnName -
      Throws:
      SQLException
    • getDoubleInternal

      protected double getDoubleInternal(int colIndex) throws SQLException
      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

      protected double getDoubleInternal(String stringVal, int colIndex) throws SQLException
      Converts a string representation of a number to a double. Need a faster way to do this.
      Parameters:
      stringVal - the double as a String
      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
    • getFetchDirection

      public int getFetchDirection() throws SQLException
      JDBC 2.0 Returns the fetch direction for this result set.
      Specified by:
      getFetchDirection in interface ResultSet
      Returns:
      the fetch direction for this result set.
      Throws:
      SQLException - if a database-access error occurs
    • getFetchSize

      public int getFetchSize() throws SQLException
      JDBC 2.0 Return the fetch size for this result set.
      Specified by:
      getFetchSize in interface ResultSet
      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:
      getFirstCharOfQuery in interface ResultSetInternalMethods
      Returns:
      the first character of the query...uppercased
    • getFloat

      public float getFloat(int columnIndex) throws SQLException
      Get the value of a column in the current row as a Java float.
      Specified by:
      getFloat in interface ResultSet
      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

      public float getFloat(String columnName) throws SQLException
      Specified by:
      getFloat in interface ResultSet
      Parameters:
      columnName -
      Throws:
      SQLException
    • getInt

      public int getInt(int columnIndex) throws SQLException
      Get the value of a column in the current row as a Java int.
      Specified by:
      getInt in interface ResultSet
      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

      public int getInt(String columnName) throws SQLException
      Specified by:
      getInt in interface ResultSet
      Parameters:
      columnName -
      Throws:
      SQLException
    • getLong

      public long getLong(int columnIndex) throws SQLException
      Get the value of a column in the current row as a Java long.
      Specified by:
      getLong in interface ResultSet
      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

      public long getLong(String columnName) throws SQLException
      Specified by:
      getLong in interface ResultSet
      Parameters:
      columnName -
      Throws:
      SQLException
    • getMetaData

      public ResultSetMetaData getMetaData() throws SQLException
      The numbers, types and properties of a ResultSet's columns are provided by the getMetaData method
      Specified by:
      getMetaData in interface ResultSet
      Returns:
      a description of the ResultSet's columns
      Throws:
      SQLException - if a database access error occurs
    • getNativeArray

      protected Array getNativeArray(int i) throws SQLException
      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 occurs
      NotImplemented
    • getNativeAsciiStream

      protected InputStream getNativeAsciiStream(int columnIndex) throws SQLException
      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

      protected BigDecimal getNativeBigDecimal(int columnIndex) throws SQLException
      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

      protected BigDecimal getNativeBigDecimal(int columnIndex, int scale) throws SQLException
      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

      protected InputStream getNativeBinaryStream(int columnIndex) throws SQLException
      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

      protected Blob getNativeBlob(int columnIndex) throws SQLException
      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

      protected byte getNativeByte(int columnIndex) throws SQLException
      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

      protected byte getNativeByte(int columnIndex, boolean overflowCheck) throws SQLException
      Throws:
      SQLException
    • getNativeBytes

      protected byte[] getNativeBytes(int columnIndex, boolean noConversion) throws SQLException
      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

      protected Reader getNativeCharacterStream(int columnIndex) throws SQLException
      JDBC 2.0

      Get 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

      protected Clob getNativeClob(int columnIndex) throws SQLException
      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

      protected Date getNativeDate(int columnIndex) throws SQLException
      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

      protected Date getNativeDate(int columnIndex, Calendar cal) throws SQLException
      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

      Date getNativeDateViaParseConversion(int columnIndex) throws SQLException
      Throws:
      SQLException
    • getNativeDouble

      protected double getNativeDouble(int columnIndex) throws SQLException
      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

      protected float getNativeFloat(int columnIndex) throws SQLException
      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

      protected int getNativeInt(int columnIndex) throws SQLException
      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

      protected int getNativeInt(int columnIndex, boolean overflowCheck) throws SQLException
      Throws:
      SQLException
    • getNativeLong

      protected long getNativeLong(int columnIndex) throws SQLException
      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

      protected Ref getNativeRef(int i) throws SQLException
      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 implemented
      NotImplemented
    • getNativeShort

      protected short getNativeShort(int columnIndex) throws SQLException
      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

      protected short getNativeShort(int columnIndex, boolean overflowCheck) throws SQLException
      Throws:
      SQLException
    • getNativeString

      protected String getNativeString(int columnIndex) throws SQLException
      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

      protected InputStream getNativeUnicodeStream(int columnIndex) throws SQLException
      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

      protected URL getNativeURL(int colIndex) throws SQLException
      Throws:
      SQLException
      See Also:
    • getNextResultSet

      public ResultSetInternalMethods getNextResultSet()
      Description copied from interface: ResultSetInternalMethods
      Returns the next ResultSet in a multi-resultset "chain", if any, null if none exists.
      Specified by:
      getNextResultSet in interface ResultSetInternalMethods
      Returns:
      Returns the nextResultSet, if any, null if none exists.
    • getObject

      public Object getObject(int columnIndex) throws SQLException
      Get the value of a column in the current row as a Java object

      This 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:
      getObject in interface ResultSet
      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

      public <T> T getObject(int columnIndex, Class<T> type) throws SQLException
      Specified by:
      getObject in interface ResultSet
      Throws:
      SQLException
    • getObject

      public <T> T getObject(String columnLabel, Class<T> type) throws SQLException
      Specified by:
      getObject in interface ResultSet
      Throws:
      SQLException
    • getObject

      public Object getObject(int i, Map<String,Class<?>> map) throws SQLException
      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:
      getObject in interface ResultSet
      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

      public Object getObject(String columnName) throws SQLException
      Get the value of a column in the current row as a Java object

      This 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:
      getObject in interface ResultSet
      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

      public Object getObject(String colName, Map<String,Class<?>> map) throws SQLException
      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:
      getObject in interface ResultSet
      Parameters:
      colName - the column name
      map - the mapping from SQL type names to Java classes
      Returns:
      an object representing the SQL value
      Throws:
      SQLException - as this is not implemented
    • getObjectStoredProc

      public Object getObjectStoredProc(int columnIndex, int desiredSqlType) throws SQLException
      Description copied from interface: ResultSetInternalMethods
      Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).
      Specified by:
      getObjectStoredProc in interface ResultSetInternalMethods
      Throws:
      SQLException
    • getObjectStoredProc

      public Object getObjectStoredProc(int i, Map<Object,Object> map, int desiredSqlType) throws SQLException
      Description copied from interface: ResultSetInternalMethods
      Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).
      Specified by:
      getObjectStoredProc in interface ResultSetInternalMethods
      Throws:
      SQLException
    • getObjectStoredProc

      public Object getObjectStoredProc(String columnName, int desiredSqlType) throws SQLException
      Description copied from interface: ResultSetInternalMethods
      Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).
      Specified by:
      getObjectStoredProc in interface ResultSetInternalMethods
      Throws:
      SQLException
    • getObjectStoredProc

      public Object getObjectStoredProc(String colName, Map<Object,Object> map, int desiredSqlType) throws SQLException
      Description copied from interface: ResultSetInternalMethods
      Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).
      Specified by:
      getObjectStoredProc in interface ResultSetInternalMethods
      Throws:
      SQLException
    • getRef

      public Ref getRef(int i) throws SQLException
      JDBC 2.0 Get a REF(<structured-type>) column.
      Specified by:
      getRef in interface ResultSet
      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 implemented
      NotImplemented
    • getRef

      public Ref getRef(String colName) throws SQLException
      JDBC 2.0 Get a REF(<structured-type>) column.
      Specified by:
      getRef in interface ResultSet
      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

      public int getRow() throws SQLException
      JDBC 2.0

      Determine the current row number. The first row is number 1, the second number 2, etc.

      Specified by:
      getRow in interface ResultSet
      Returns:
      the current row number, else return 0 if there is no current row
      Throws:
      SQLException - if a database-access error occurs.
    • getServerInfo

      public String getServerInfo()
      Returns the server info (if any), or null if none.
      Specified by:
      getServerInfo in interface ResultSetInternalMethods
      Returns:
      server info created for this ResultSet
    • getShort

      public short getShort(int columnIndex) throws SQLException
      Get the value of a column in the current row as a Java short.
      Specified by:
      getShort in interface ResultSet
      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

      public short getShort(String columnName) throws SQLException
      Specified by:
      getShort in interface ResultSet
      Parameters:
      columnName -
      Throws:
      SQLException
    • getStatement

      public Statement getStatement() throws SQLException
      JDBC 2.0 Return the Statement that produced the ResultSet.
      Specified by:
      getStatement in interface ResultSet
      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

      public String getString(int columnIndex) throws SQLException
      Get the value of a column in the current row as a Java String
      Specified by:
      getString in interface ResultSet
      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

      public String getString(String columnName) throws SQLException
      The following routines simply convert the columnName into a columnIndex and then call the appropriate routine above.
      Specified by:
      getString in interface ResultSet
      Parameters:
      columnName - is the SQL name of the column
      Returns:
      the column value
      Throws:
      SQLException - if a database access error occurs
    • getStringInternal

      protected String getStringInternal(int columnIndex, boolean checkDateTypes) throws SQLException
      Throws:
      SQLException
    • getTime

      public Time getTime(int columnIndex) throws SQLException
      Get the value of a column in the current row as a java.sql.Time object
      Specified by:
      getTime in interface ResultSet
      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

      public Time getTime(int columnIndex, Calendar cal) throws SQLException
      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:
      getTime in interface ResultSet
      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

      public Time getTime(String columnName) throws SQLException
      Get the value of a column in the current row as a java.sql.Time object.
      Specified by:
      getTime in interface ResultSet
      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

      public Time getTime(String columnName, Calendar cal) throws SQLException
      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:
      getTime in interface ResultSet
      Parameters:
      columnName - is the SQL name of the column
      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.
    • getTimestamp

      public Timestamp getTimestamp(int columnIndex) throws SQLException
      Get the value of a column in the current row as a java.sql.Timestamp object
      Specified by:
      getTimestamp in interface ResultSet
      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

      public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException
      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:
      getTimestamp in interface ResultSet
      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

      public Timestamp getTimestamp(String columnName) throws SQLException
      Specified by:
      getTimestamp in interface ResultSet
      Parameters:
      columnName -
      Throws:
      SQLException
    • getTimestamp

      public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException
      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:
      getTimestamp in interface ResultSet
      Parameters:
      columnName - is the SQL name of the column
      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.
    • getType

      public int getType() throws SQLException
      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:
      getType in interface ResultSet
      Returns:
      TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, or TYPE_SCROLL_SENSITIVE
      Throws:
      SQLException - if a database-access error occurs
    • getUnicodeStream

      @Deprecated public InputStream getUnicodeStream(int columnIndex) throws SQLException
      Deprecated.
      A column value can also be retrieved as a stream of Unicode characters. We implement this as a binary stream.
      Specified by:
      getUnicodeStream in interface ResultSet
      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 public InputStream getUnicodeStream(String columnName) throws SQLException
      Deprecated.
      Specified by:
      getUnicodeStream in interface ResultSet
      Parameters:
      columnName -
      Throws:
      SQLException
    • getUpdateCount

      public long getUpdateCount()
      Description copied from interface: ResultSetInternalMethods
      Returns the update count for this result set (if one exists), otherwise -1.
      Specified by:
      getUpdateCount in interface ResultSetInternalMethods
    • getUpdateID

      public long getUpdateID()
      Description copied from interface: ResultSetInternalMethods
      Returns the AUTO_INCREMENT value for the DDL/DML statement which created this result set.
      Specified by:
      getUpdateID in interface ResultSetInternalMethods
      Returns:
      the AUTO_INCREMENT value for the DDL/DML statement which created this result set.
    • getURL

      public URL getURL(int colIndex) throws SQLException
      Specified by:
      getURL in interface ResultSet
      Throws:
      SQLException
      See Also:
    • getURL

      public URL getURL(String colName) throws SQLException
      Specified by:
      getURL in interface ResultSet
      Throws:
      SQLException
      See Also:
    • getWarnings

      public SQLWarning getWarnings() throws SQLException
      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:
      getWarnings in interface ResultSet
      Returns:
      the first java.sql.SQLWarning or null;
      Throws:
      SQLException - if a database access error occurs.
    • insertRow

      public void insertRow() throws SQLException
      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:
      insertRow in interface ResultSet
      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 value
      NotUpdatable
    • isAfterLast

      public boolean isAfterLast() throws SQLException
      JDBC 2.0

      Determine if the cursor is after the last row in the result set.

      Specified by:
      isAfterLast in interface ResultSet
      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

      public boolean isBeforeFirst() throws SQLException
      JDBC 2.0

      Determine if the cursor is before the first row in the result set.

      Specified by:
      isBeforeFirst in interface ResultSet
      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

      public boolean isFirst() throws SQLException
      JDBC 2.0

      Determine if the cursor is on the first row of the result set.

      Specified by:
      isFirst in interface ResultSet
      Returns:
      true if on the first row, false otherwise.
      Throws:
      SQLException - if a database-access error occurs.
    • isLast

      public boolean isLast() throws SQLException
      JDBC 2.0

      Determine 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:
      isLast in interface ResultSet
      Returns:
      true if on the last row, false otherwise.
      Throws:
      SQLException - if a database-access error occurs.
    • last

      public boolean last() throws SQLException
      JDBC 2.0

      Moves to the last row in the result set.

      Specified by:
      last in interface ResultSet
      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

      public void moveToCurrentRow() throws SQLException
      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:
      moveToCurrentRow in interface ResultSet
      Throws:
      SQLException - if a database-access error occurs, or the result set is not updatable
      NotUpdatable
    • moveToInsertRow

      public void moveToInsertRow() throws SQLException
      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:
      moveToInsertRow in interface ResultSet
      Throws:
      SQLException - if a database-access error occurs, or the result set is not updatable
      NotUpdatable
    • next

      public boolean next() throws SQLException
      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:
      next in interface ResultSet
      Returns:
      true if the new current is valid; false if there are no more rows
      Throws:
      SQLException - if a database access error occurs
    • prev

      public boolean prev() throws SQLException
      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

      public boolean previous() throws SQLException
      JDBC 2.0

      Moves 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:
      previous in interface ResultSet
      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

      public void realClose(boolean calledExplicitly) throws SQLException
      Closes this ResultSet and releases resources.
      Specified by:
      realClose in interface ResultSetInternalMethods
      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

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

      public boolean reallyResult()
      Description copied from interface: ResultSetInternalMethods
      Does the result set contain rows, or is it the result of a DDL or DML statement?
      Specified by:
      reallyResult in interface ResultSetInternalMethods
    • refreshRow

      public void refreshRow() throws SQLException
      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:
      refreshRow in interface ResultSet
      Throws:
      SQLException - if a database-access error occurs, or if called when on the insert row.
      NotUpdatable
    • relative

      public boolean relative(int rows) throws SQLException
      JDBC 2.0

      Moves 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:
      relative in interface ResultSet
      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

      public boolean rowDeleted() throws SQLException
      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:
      rowDeleted in interface ResultSet
      Returns:
      true if deleted and deletes are detected
      Throws:
      SQLException - if a database-access error occurs
      NotImplemented
      See Also:
    • rowInserted

      public boolean rowInserted() throws SQLException
      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:
      rowInserted in interface ResultSet
      Returns:
      true if inserted and inserts are detected
      Throws:
      SQLException - if a database-access error occurs
      NotImplemented
      See Also:
    • rowUpdated

      public boolean rowUpdated() throws SQLException
      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:
      rowUpdated in interface ResultSet
      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 occurs
      NotImplemented
      See Also:
    • setBinaryEncoded

      protected void setBinaryEncoded()
      Flag that this result set is 'binary' encoded (from a PreparedStatement), not stored as strings.
    • setFetchDirection

      public void setFetchDirection(int direction) throws SQLException
      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:
      setFetchDirection in interface ResultSet
      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

      public void setFetchSize(int rows) throws SQLException
      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:
      setFetchSize in interface ResultSet
      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:
      setFirstCharOfQuery in interface ResultSetInternalMethods
      Parameters:
      c - the first character of the query...uppercased
    • setNextResultSet

      protected void setNextResultSet(ResultSetInternalMethods nextResultSet)
      Parameters:
      nextResultSet - Sets the next result set in the result set chain for multiple result sets.
    • setOwningStatement

      public void setOwningStatement(StatementImpl owningStatement)
      Description copied from interface: ResultSetInternalMethods
      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.
      Specified by:
      setOwningStatement in interface ResultSetInternalMethods
    • 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

      protected void setServerInfo(String info)
      Sets server info (if any)
      Parameters:
      info - the server info message
    • setStatementUsedForFetchingRows

      public void setStatementUsedForFetchingRows(PreparedStatement stmt)
      Specified by:
      setStatementUsedForFetchingRows in interface ResultSetInternalMethods
    • setWrapperStatement

      public void setWrapperStatement(Statement wrapperStatement)
      Specified by:
      setWrapperStatement in interface ResultSetInternalMethods
      Parameters:
      wrapperStatement - The wrapperStatement to set.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • updateArray

      public void updateArray(int arg0, Array arg1) throws SQLException
      Specified by:
      updateArray in interface ResultSet
      Throws:
      SQLException
      See Also:
    • updateArray

      public void updateArray(String arg0, Array arg1) throws SQLException
      Specified by:
      updateArray in interface ResultSet
      Throws:
      SQLException
      See Also:
    • updateAsciiStream

      public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException
      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:
      updateAsciiStream in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      length - the length of the stream
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateAsciiStream

      public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException
      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:
      updateAsciiStream in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      length - of the stream
      Throws:
      SQLException - if a database-access error occurs
    • updateBigDecimal

      public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException
      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:
      updateBigDecimal in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateBigDecimal

      public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException
      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:
      updateBigDecimal in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
    • updateBinaryStream

      public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException
      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:
      updateBinaryStream in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      length - the length of the stream
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateBinaryStream

      public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException
      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:
      updateBinaryStream in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      length - of the stream
      Throws:
      SQLException - if a database-access error occurs
    • updateBlob

      public void updateBlob(int arg0, Blob arg1) throws SQLException
      Specified by:
      updateBlob in interface ResultSet
      Throws:
      SQLException
      See Also:
    • updateBlob

      public void updateBlob(String arg0, Blob arg1) throws SQLException
      Specified by:
      updateBlob in interface ResultSet
      Throws:
      SQLException
      See Also:
    • updateBoolean

      public void updateBoolean(int columnIndex, boolean x) throws SQLException
      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:
      updateBoolean in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateBoolean

      public void updateBoolean(String columnName, boolean x) throws SQLException
      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:
      updateBoolean in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
    • updateByte

      public void updateByte(int columnIndex, byte x) throws SQLException
      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:
      updateByte in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateByte

      public void updateByte(String columnName, byte x) throws SQLException
      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:
      updateByte in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
    • updateBytes

      public void updateBytes(int columnIndex, byte[] x) throws SQLException
      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:
      updateBytes in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateBytes

      public void updateBytes(String columnName, byte[] x) throws SQLException
      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:
      updateBytes in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
    • updateCharacterStream

      public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException
      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:
      updateCharacterStream in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      length - the length of the stream
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateCharacterStream

      public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException
      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:
      updateCharacterStream in interface ResultSet
      Parameters:
      columnName - the name of the column
      reader - the stream to update the column with
      length - of the stream
      Throws:
      SQLException - if a database-access error occurs
    • updateClob

      public void updateClob(int arg0, Clob arg1) throws SQLException
      Specified by:
      updateClob in interface ResultSet
      Throws:
      SQLException
      See Also:
    • updateClob

      public void updateClob(String columnName, Clob clob) throws SQLException
      Specified by:
      updateClob in interface ResultSet
      Throws:
      SQLException
      See Also:
    • updateDate

      public void updateDate(int columnIndex, Date x) throws SQLException
      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:
      updateDate in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateDate

      public void updateDate(String columnName, Date x) throws SQLException
      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:
      updateDate in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
    • updateDouble

      public void updateDouble(int columnIndex, double x) throws SQLException
      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:
      updateDouble in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateDouble

      public void updateDouble(String columnName, double x) throws SQLException
      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:
      updateDouble in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
    • updateFloat

      public void updateFloat(int columnIndex, float x) throws SQLException
      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:
      updateFloat in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateFloat

      public void updateFloat(String columnName, float x) throws SQLException
      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:
      updateFloat in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
    • updateInt

      public void updateInt(int columnIndex, int x) throws SQLException
      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:
      updateInt in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateInt

      public void updateInt(String columnName, int x) throws SQLException
      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:
      updateInt in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
    • updateLong

      public void updateLong(int columnIndex, long x) throws SQLException
      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:
      updateLong in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateLong

      public void updateLong(String columnName, long x) throws SQLException
      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:
      updateLong in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
    • updateNull

      public void updateNull(int columnIndex) throws SQLException
      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:
      updateNull in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateNull

      public void updateNull(String columnName) throws SQLException
      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:
      updateNull in interface ResultSet
      Parameters:
      columnName - the name of the column
      Throws:
      SQLException - if a database-access error occurs
    • updateObject

      public void updateObject(int columnIndex, Object x) throws SQLException
      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:
      updateObject in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateObject

      public void updateObject(int columnIndex, Object x, int scale) throws SQLException
      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:
      updateObject in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      scale - 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
      NotUpdatable
    • updateObject

      public void updateObject(String columnName, Object x) throws SQLException
      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:
      updateObject in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
    • updateObject

      public void updateObject(String columnName, Object x, int scale) throws SQLException
      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:
      updateObject in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      scale - 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

      public void updateRef(int arg0, Ref arg1) throws SQLException
      Specified by:
      updateRef in interface ResultSet
      Throws:
      SQLException
      See Also:
    • updateRef

      public void updateRef(String arg0, Ref arg1) throws SQLException
      Specified by:
      updateRef in interface ResultSet
      Throws:
      SQLException
      See Also:
    • updateRow

      public void updateRow() throws SQLException
      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:
      updateRow in interface ResultSet
      Throws:
      SQLException - if a database-access error occurs, or if called when on the insert row
      NotUpdatable
    • updateShort

      public void updateShort(int columnIndex, short x) throws SQLException
      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:
      updateShort in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateShort

      public void updateShort(String columnName, short x) throws SQLException
      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:
      updateShort in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
    • updateString

      public void updateString(int columnIndex, String x) throws SQLException
      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:
      updateString in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateString

      public void updateString(String columnName, String x) throws SQLException
      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:
      updateString in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
    • updateTime

      public void updateTime(int columnIndex, Time x) throws SQLException
      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:
      updateTime in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateTime

      public void updateTime(String columnName, Time x) throws SQLException
      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:
      updateTime in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
    • updateTimestamp

      public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException
      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:
      updateTimestamp in interface ResultSet
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
      NotUpdatable
    • updateTimestamp

      public void updateTimestamp(String columnName, Timestamp x) throws SQLException
      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:
      updateTimestamp in interface ResultSet
      Parameters:
      columnName - the name of the column
      x - the new column value
      Throws:
      SQLException - if a database-access error occurs
    • wasNull

      public boolean wasNull() throws SQLException
      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:
      wasNull in interface ResultSet
      Returns:
      true if the last column read was SQL NULL
      Throws:
      SQLException - if a database access error occurred
    • getGmtCalendar

      protected Calendar getGmtCalendar()
    • getExceptionInterceptor

      protected ExceptionInterceptor getExceptionInterceptor()
    • getId

      public int getId()
      Specified by:
      getId in interface ResultSetInternalMethods