com.mysql.jdbc
Class ResultSetImpl

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

public class ResultSetImpl
extends java.lang.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.

See Also:
ResultSetMetaData, ResultSet

Field Summary
protected  java.lang.String catalog
          The catalog that was in use when we were created
protected  java.util.Map columnLabelToIndex
          Map column names (and all of their permutations) to column indices
protected  java.util.Map columnNameToIndex
           
protected  java.util.Map 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()....
protected  boolean[] columnUsed
          Keep track of columns accessed
protected  ConnectionImpl connection
          The Connection instance that created us
protected  long connectionId
           
protected  int currentRow
          The current row #, -1 == before start of result set
(package private)  java.util.TimeZone defaultTimeZone
           
protected  boolean doingUpdates
          Are we in the middle of doing updates to the current row?
protected static char[] EMPTY_SPACE
           
protected  com.mysql.jdbc.profiler.ProfilerEventHandler eventSink
           
(package private)  java.util.Calendar fastDateCal
           
protected  int fetchDirection
          The direction to fetch rows (always FETCH_FORWARD)
protected  int fetchSize
          The number of rows to fetch in one go...
protected  Field[] fields
          The fields for this result set
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.
protected  java.util.Map fullColumnNameToIndex
          Map of fully-specified column names to column indices
protected  java.util.Calendar gmtCalendar
           
protected  boolean hasBuiltIndexMapping
           
protected  boolean isBinaryEncoded
          Is the data stored as strings (default) or natively (which is the case with results from PrepStmts)
protected  boolean isClosed
          Has this result set been closed?
protected static double MAX_DIFF_PREC
          Epsillon between Float.MAX_VALUE and the double representation of said value.
protected static double MIN_DIFF_PREC
          Epsillon between Float.MIN_VALUE and the double representation of said value.
protected  ResultSetInternalMethods nextResultSet
           
protected  boolean onInsertRow
          Are we on the insert row?
protected  StatementImpl owningStatement
          The statement that created us
protected  java.lang.Throwable pointOfOrigin
          StackTrace generated where ResultSet was created... used when profiling
protected  boolean profileSql
          Are we tracking items for profileSql?
protected  boolean reallyResult
          Do we actually contain rows, or just information about UPDATE/INSERT/DELETE?
protected static int resultCounter
          Counter used to generate IDs for profiling.
protected  int resultId
          The id (used when profiling) to identify us
protected  int resultSetConcurrency
          Are we read-only or updatable?
protected  int resultSetType
          Are we scroll-sensitive/insensitive?
protected  boolean retainOwningStatement
           
protected  RowData rowData
          The actual rows
protected  java.lang.String serverInfo
          Any info message from the server that was created while generating this result set (if 'info parsing' is enabled for the connection).
(package private)  PreparedStatement statementUsedForFetchingRows
           
protected  ResultSetRow thisRow
          Pointer to current row data
protected  long updateCount
          How many rows were affected by UPDATE/INSERT/DELETE?
protected  long updateId
          Value generated for AUTO_INCREMENT columns
protected  boolean useFastDateParsing
           
protected  boolean useLegacyDatetimeCode
           
protected  boolean useUsageAdvisor
           
protected  java.sql.SQLWarning warningChain
          The warning chain
protected  boolean wasNullFlag
          Did the previous value retrieval find a NULL?
protected  java.sql.Statement wrapperStatement
           
 
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
 
Constructor Summary
ResultSetImpl(long updateCount, long updateID, ConnectionImpl conn, StatementImpl creatorStmt)
          Create a result set for an executeUpdate statement.
ResultSetImpl(java.lang.String catalog, Field[] fields, RowData tuples, ConnectionImpl conn, StatementImpl creatorStmt)
          Creates a new ResultSet object.
 
Method Summary
 boolean absolute(int row)
          JDBC 2.0 Move to an absolute row number in the result set.
 void afterLast()
          JDBC 2.0 Moves to the end of the result set, just after the last row.
static boolean arraysEqual(byte[] left, byte[] right)
           
 void beforeFirst()
          JDBC 2.0 Moves to the front of the result set, just before the first row.
 void buildIndexMapping()
          Builds a hash between column names and their indices for fast retrieval.
 void cancelRowUpdates()
          JDBC 2.0 The cancelRowUpdates() method may be called after calling an updateXXX() method(s) and before calling updateRow() to rollback the updates made to a row.
protected  void checkClosed()
          Ensures that the result set is not closed
protected  void checkColumnBounds(int columnIndex)
          Checks if columnIndex is within the number of columns in this result set.
protected  void checkRowPos()
          Ensures that the cursor is positioned on a valid row and that the result set is not closed
 void clearNextResult()
          We can't do this ourselves, otherwise the contract for Statement.getMoreResults() won't work correctly.
 void clearWarnings()
          After this call, getWarnings returns null until a new warning is reported for this ResultSet
 void close()
          In some cases, it is desirable to immediately release a ResultSet database and JDBC resources instead of waiting for this to happen when it is automatically closed.
protected static java.math.BigInteger convertLongToUlong(long longVal)
          Converts the given value as a java long, to an 'unsigned' long, using the java.math.BigInteger class.
 ResultSetInternalMethods copy()
          Returns a new instance of this result set, that shares the underlying row data.
 void deleteRow()
          JDBC 2.0 Delete the current row from the result set and the underlying database.
protected  java.sql.Date fastDateCreate(java.util.Calendar cal, int year, int month, int day)
           
protected  java.sql.Time fastTimeCreate(java.util.Calendar cal, int hour, int minute, int second)
           
protected  java.sql.Timestamp fastTimestampCreate(java.util.Calendar cal, int year, int month, int day, int hour, int minute, int seconds, int secondsPart)
           
 int findColumn(java.lang.String columnName)
           
 boolean first()
          JDBC 2.0 Moves to the first row in the result set.
 java.sql.Array getArray(int i)
          JDBC 2.0 Get an array column.
 java.sql.Array getArray(java.lang.String colName)
          JDBC 2.0 Get an array column.
 java.io.InputStream getAsciiStream(int columnIndex)
          A column value can be retrieved as a stream of ASCII characters and then read in chunks from the stream.
 java.io.InputStream getAsciiStream(java.lang.String columnName)
          DOCUMENT ME!
 java.math.BigDecimal getBigDecimal(int columnIndex)
          JDBC 2.0 Get the value of a column in the current row as a java.math.BigDecimal object.
 java.math.BigDecimal getBigDecimal(int columnIndex, int scale)
          Deprecated.  
 java.math.BigDecimal getBigDecimal(java.lang.String columnName)
          JDBC 2.0 Get the value of a column in the current row as a java.math.BigDecimal object.
 java.math.BigDecimal getBigDecimal(java.lang.String columnName, int scale)
          Deprecated.  
 java.io.InputStream getBinaryStream(int columnIndex)
          A column value can also be retrieved as a binary stream.
 java.io.InputStream getBinaryStream(java.lang.String columnName)
          DOCUMENT ME!
 java.sql.Blob getBlob(int columnIndex)
          JDBC 2.0 Get a BLOB column.
 java.sql.Blob getBlob(java.lang.String colName)
          JDBC 2.0 Get a BLOB column.
 boolean getBoolean(int columnIndex)
          Get the value of a column in the current row as a Java boolean
 boolean getBoolean(java.lang.String columnName)
          DOCUMENT ME!
 byte getByte(int columnIndex)
          Get the value of a column in the current row as a Java byte.
 byte getByte(java.lang.String columnName)
          DOCUMENT ME!
 byte[] getBytes(int columnIndex)
          Get the value of a column in the current row as a Java byte array.
protected  byte[] getBytes(int columnIndex, boolean noConversion)
           
 byte[] getBytes(java.lang.String columnName)
          DOCUMENT ME!
 int getBytesSize()
           
protected  java.util.Calendar getCalendarInstanceForSessionOrNew()
          Optimization to only use one calendar per-session, or calculate it for each call, depending on user configuration
 java.io.Reader getCharacterStream(int columnIndex)
          JDBC 2.0 Get the value of a column in the current row as a java.io.Reader.
 java.io.Reader getCharacterStream(java.lang.String columnName)
          JDBC 2.0 Get the value of a column in the current row as a java.io.Reader.
 java.sql.Clob getClob(int i)
          JDBC 2.0 Get a CLOB column.
 java.sql.Clob getClob(java.lang.String colName)
          JDBC 2.0 Get a CLOB column.
 int getConcurrency()
          JDBC 2.0 Return the concurrency of this result set.
 java.lang.String getCursorName()
          Get the name of the SQL cursor used by this ResultSet In SQL, a result table is retrieved though a cursor that is named.
 java.sql.Date getDate(int columnIndex)
          Get the value of a column in the current row as a java.sql.Date object
 java.sql.Date getDate(int columnIndex, java.util.Calendar cal)
          JDBC 2.0 Get the value of a column in the current row as a java.sql.Date object.
 java.sql.Date getDate(java.lang.String columnName)
          DOCUMENT ME!
 java.sql.Date getDate(java.lang.String columnName, java.util.Calendar cal)
          Get the value of a column in the current row as a java.sql.Date object.
 double getDouble(int columnIndex)
          Get the value of a column in the current row as a Java double.
 double getDouble(java.lang.String columnName)
          DOCUMENT ME!
protected  double getDoubleInternal(int colIndex)
          Converts a string representation of a number to a double.
protected  double getDoubleInternal(java.lang.String stringVal, int colIndex)
          Converts a string representation of a number to a double.
protected  ExceptionInterceptor getExceptionInterceptor()
           
 int getFetchDirection()
          JDBC 2.0 Returns the fetch direction for this result set.
 int getFetchSize()
          JDBC 2.0 Return the fetch size for this result set.
 char getFirstCharOfQuery()
          Returns the first character of the query that this result set was created from.
 float getFloat(int columnIndex)
          Get the value of a column in the current row as a Java float.
 float getFloat(java.lang.String columnName)
          DOCUMENT ME!
protected  java.util.Calendar getGmtCalendar()
           
protected static ResultSetImpl getInstance(long updateCount, long updateID, ConnectionImpl conn, StatementImpl creatorStmt)
           
protected static ResultSetImpl getInstance(java.lang.String catalog, Field[] fields, RowData tuples, ConnectionImpl conn, StatementImpl creatorStmt, boolean isUpdatable)
          Creates a result set instance that represents a query result -- We need to provide factory-style methods so we can support both JDBC3 (and older) and JDBC4 runtimes, otherwise the class verifier complains when it tries to load JDBC4-only interface classes that are present in JDBC4 method signatures.
 int getInt(int columnIndex)
          Get the value of a column in the current row as a Java int.
 int getInt(java.lang.String columnName)
          DOCUMENT ME!
 long getLong(int columnIndex)
          Get the value of a column in the current row as a Java long.
 long getLong(java.lang.String columnName)
          DOCUMENT ME!
 java.sql.ResultSetMetaData getMetaData()
          The numbers, types and properties of a ResultSet's columns are provided by the getMetaData method
protected  java.sql.Array getNativeArray(int i)
          JDBC 2.0 Get an array column.
protected  java.io.InputStream getNativeAsciiStream(int columnIndex)
          A column value can be retrieved as a stream of ASCII characters and then read in chunks from the stream.
protected  java.math.BigDecimal getNativeBigDecimal(int columnIndex)
          JDBC 2.0 Get the value of a column in the current row as a java.math.BigDecimal object.
protected  java.math.BigDecimal getNativeBigDecimal(int columnIndex, int scale)
          Get the value of a column in the current row as a java.math.BigDecimal object
protected  java.io.InputStream getNativeBinaryStream(int columnIndex)
          A column value can also be retrieved as a binary stream.
protected  java.sql.Blob getNativeBlob(int columnIndex)
          JDBC 2.0 Get a BLOB column.
protected  byte getNativeByte(int columnIndex)
          Get the value of a column in the current row as a Java byte.
protected  byte getNativeByte(int columnIndex, boolean overflowCheck)
           
protected  byte[] getNativeBytes(int columnIndex, boolean noConversion)
          Get the value of a column in the current row as a Java byte array.
protected  java.io.Reader getNativeCharacterStream(int columnIndex)
          JDBC 2.0 Get the value of a column in the current row as a java.io.Reader.
protected  java.sql.Clob getNativeClob(int columnIndex)
          JDBC 2.0 Get a CLOB column.
protected  java.sql.Date getNativeDate(int columnIndex)
          Get the value of a column in the current row as a java.sql.Date object
protected  java.sql.Date getNativeDate(int columnIndex, java.util.Calendar cal)
          JDBC 2.0 Get the value of a column in the current row as a java.sql.Date object.
(package private)  java.sql.Date getNativeDateViaParseConversion(int columnIndex)
           
protected  double getNativeDouble(int columnIndex)
          Get the value of a column in the current row as a Java double.
protected  float getNativeFloat(int columnIndex)
          Get the value of a column in the current row as a Java float.
protected  int getNativeInt(int columnIndex)
          Get the value of a column in the current row as a Java int.
protected  int getNativeInt(int columnIndex, boolean overflowCheck)
           
protected  long getNativeLong(int columnIndex)
          Get the value of a column in the current row as a Java long.
protected  long getNativeLong(int columnIndex, boolean overflowCheck, boolean expandUnsignedLong)
           
protected  java.sql.Ref getNativeRef(int i)
          JDBC 2.0 Get a REF(<structured-type>) column.
protected  short getNativeShort(int columnIndex)
          Get the value of a column in the current row as a Java short.
protected  short getNativeShort(int columnIndex, boolean overflowCheck)
           
protected  java.lang.String getNativeString(int columnIndex)
          Get the value of a column in the current row as a Java String
(package private)  java.sql.Timestamp getNativeTimestampViaParseConversion(int columnIndex, java.util.Calendar targetCalendar, java.util.TimeZone tz, boolean rollForward)
           
(package private)  java.sql.Time getNativeTimeViaParseConversion(int columnIndex, java.util.Calendar targetCalendar, java.util.TimeZone tz, boolean rollForward)
           
protected  java.io.InputStream getNativeUnicodeStream(int columnIndex)
          A column value can also be retrieved as a stream of Unicode characters.
protected  java.net.URL getNativeURL(int colIndex)
           
 ResultSetInternalMethods getNextResultSet()
          DOCUMENT ME!
 java.lang.Object getObject(int columnIndex)
          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.
 java.lang.Object getObject(int i, java.util.Map map)
          JDBC 2.0 Returns the value of column i as a Java object.
 java.lang.Object getObject(java.lang.String columnName)
          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.
 java.lang.Object getObject(java.lang.String colName, java.util.Map map)
          JDBC 2.0 Returns the value of column i as a Java object.
 java.lang.Object getObjectStoredProc(int columnIndex, int desiredSqlType)
          Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).
 java.lang.Object getObjectStoredProc(int i, java.util.Map map, int desiredSqlType)
          Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).
 java.lang.Object getObjectStoredProc(java.lang.String columnName, int desiredSqlType)
          Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).
 java.lang.Object getObjectStoredProc(java.lang.String colName, java.util.Map map, int desiredSqlType)
          Functions like ResultSet.getObject(), but using the given SQL type (as registered during CallableStatement.registerOutParameter()).
 java.sql.Ref getRef(int i)
          JDBC 2.0 Get a REF(<structured-type>) column.
 java.sql.Ref getRef(java.lang.String colName)
          JDBC 2.0 Get a REF(<structured-type>) column.
 int getRow()
          JDBC 2.0 Determine the current row number.
 java.lang.String getServerInfo()
          Returns the server info (if any), or null if none.
 short getShort(int columnIndex)
          Get the value of a column in the current row as a Java short.
 short getShort(java.lang.String columnName)
          DOCUMENT ME!
 java.sql.Statement getStatement()
          JDBC 2.0 Return the Statement that produced the ResultSet.
 java.lang.String getString(int columnIndex)
          Get the value of a column in the current row as a Java String
 java.lang.String getString(java.lang.String columnName)
          The following routines simply convert the columnName into a columnIndex and then call the appropriate routine above.
protected  java.lang.String getStringInternal(int columnIndex, boolean checkDateTypes)
           
 java.sql.Time getTime(int columnIndex)
          Get the value of a column in the current row as a java.sql.Time object
 java.sql.Time getTime(int columnIndex, java.util.Calendar cal)
          Get the value of a column in the current row as a java.sql.Time object.
 java.sql.Time getTime(java.lang.String columnName)
          Get the value of a column in the current row as a java.sql.Time object.
 java.sql.Time getTime(java.lang.String columnName, java.util.Calendar cal)
          Get the value of a column in the current row as a java.sql.Time object.
 java.sql.Timestamp getTimestamp(int columnIndex)
          Get the value of a column in the current row as a java.sql.Timestamp object
 java.sql.Timestamp getTimestamp(int columnIndex, java.util.Calendar cal)
          Get the value of a column in the current row as a java.sql.Timestamp object.
 java.sql.Timestamp getTimestamp(java.lang.String columnName)
          DOCUMENT ME!
 java.sql.Timestamp getTimestamp(java.lang.String columnName, java.util.Calendar cal)
          Get the value of a column in the current row as a java.sql.Timestamp object.
 int getType()
          JDBC 2.0 Return the type of this result set.
 java.io.InputStream getUnicodeStream(int columnIndex)
          Deprecated.  
 java.io.InputStream getUnicodeStream(java.lang.String columnName)
          Deprecated.  
 long getUpdateCount()
          Returns the update count for this result set (if one exists), otherwise -1.
 long getUpdateID()
          Returns the AUTO_INCREMENT value for the DDL/DML statement which created this result set.
 java.net.URL getURL(int colIndex)
           
 java.net.URL getURL(java.lang.String colName)
           
 java.sql.SQLWarning getWarnings()
          The first warning reported by calls on this ResultSet is returned.
 void initializeFromCachedMetaData(CachedResultSetMetaData cachedMetaData)
           
 void initializeWithMetadata()
           
 void insertRow()
          JDBC 2.0 Insert the contents of the insert row into the result set and the database.
 boolean isAfterLast()
          JDBC 2.0 Determine if the cursor is after the last row in the result set.
 boolean isBeforeFirst()
          JDBC 2.0 Determine if the cursor is before the first row in the result set.
 boolean isFirst()
          JDBC 2.0 Determine if the cursor is on the first row of the result set.
 boolean isLast()
          JDBC 2.0 Determine if the cursor is on the last row of the result set.
 boolean last()
          JDBC 2.0 Moves to the last row in the result set.
 void moveToCurrentRow()
          JDBC 2.0 Move the cursor to the remembered cursor position, usually the current row.
 void moveToInsertRow()
          JDBC 2.0 Move to the insert row.
 boolean next()
          A ResultSet is initially positioned before its first row, the first call to next makes the first row the current row; the second call makes the second row the current row, etc.
 void populateCachedMetaData(CachedResultSetMetaData cachedMetaData)
           
 boolean prev()
          The prev method is not part of JDBC, but because of the architecture of this driver it is possible to move both forward and backward within the result set.
 boolean previous()
          JDBC 2.0 Moves to the previous row in the result set.
 void realClose(boolean calledExplicitly)
          Closes this ResultSet and releases resources.
 boolean reallyResult()
          Does the result set contain rows, or is it the result of a DDL or DML statement?
 void redefineFieldsForDBMD(Field[] f)
          Used by DatabaseMetadata implementations to coerce the metadata returned by metadata queries into that required by the JDBC specification.
 void refreshRow()
          JDBC 2.0 Refresh the value of the current row with its current value in the database.
 boolean relative(int rows)
          JDBC 2.0 Moves a relative number of rows, either positive or negative.
 boolean rowDeleted()
          JDBC 2.0 Determine if this row has been deleted.
 boolean rowInserted()
          JDBC 2.0 Determine if the current row has been inserted.
 boolean rowUpdated()
          JDBC 2.0 Determine if the current row has been updated.
protected  void setBinaryEncoded()
          Flag that this result set is 'binary' encoded (from a PreparedStatement), not stored as strings.
 void setFetchDirection(int direction)
          JDBC 2.0 Give a hint as to the direction in which the rows in this result set will be processed.
 void setFetchSize(int rows)
          JDBC 2.0 Give the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this result set.
 void setFirstCharOfQuery(char c)
          Sets the first character of the query that this result set was created from.
protected  void setNextResultSet(ResultSetInternalMethods nextResultSet)
          DOCUMENT ME!
 void setOwningStatement(StatementImpl owningStatement)
          Sets the statement that "owns" this result set (usually used when the result set should internally "belong" to one statement, but is created by another.
protected  void setResultSetConcurrency(int concurrencyFlag)
          Sets the concurrency (JDBC2)
protected  void setResultSetType(int typeFlag)
          Sets the result set type for (JDBC2)
protected  void setServerInfo(java.lang.String info)
          Sets server info (if any)
 void setStatementUsedForFetchingRows(PreparedStatement stmt)
           
 void setWrapperStatement(java.sql.Statement wrapperStatement)
           
 java.lang.String toString()
          DOCUMENT ME!
 void updateArray(int arg0, java.sql.Array arg1)
           
 void updateArray(java.lang.String arg0, java.sql.Array arg1)
           
 void updateAsciiStream(int columnIndex, java.io.InputStream x, int length)
          JDBC 2.0 Update a column with an ascii stream value.
 void updateAsciiStream(java.lang.String columnName, java.io.InputStream x, int length)
          JDBC 2.0 Update a column with an ascii stream value.
 void updateBigDecimal(int columnIndex, java.math.BigDecimal x)
          JDBC 2.0 Update a column with a BigDecimal value.
 void updateBigDecimal(java.lang.String columnName, java.math.BigDecimal x)
          JDBC 2.0 Update a column with a BigDecimal value.
 void updateBinaryStream(int columnIndex, java.io.InputStream x, int length)
          JDBC 2.0 Update a column with a binary stream value.
 void updateBinaryStream(java.lang.String columnName, java.io.InputStream x, int length)
          JDBC 2.0 Update a column with a binary stream value.
 void updateBlob(int arg0, java.sql.Blob arg1)
           
 void updateBlob(java.lang.String arg0, java.sql.Blob arg1)
           
 void updateBoolean(int columnIndex, boolean x)
          JDBC 2.0 Update a column with a boolean value.
 void updateBoolean(java.lang.String columnName, boolean x)
          JDBC 2.0 Update a column with a boolean value.
 void updateByte(int columnIndex, byte x)
          JDBC 2.0 Update a column with a byte value.
 void updateByte(java.lang.String columnName, byte x)
          JDBC 2.0 Update a column with a byte value.
 void updateBytes(int columnIndex, byte[] x)
          JDBC 2.0 Update a column with a byte array value.
 void updateBytes(java.lang.String columnName, byte[] x)
          JDBC 2.0 Update a column with a byte array value.
 void updateCharacterStream(int columnIndex, java.io.Reader x, int length)
          JDBC 2.0 Update a column with a character stream value.
 void updateCharacterStream(java.lang.String columnName, java.io.Reader reader, int length)
          JDBC 2.0 Update a column with a character stream value.
 void updateClob(int arg0, java.sql.Clob arg1)
           
 void updateClob(java.lang.String columnName, java.sql.Clob clob)
           
 void updateDate(int columnIndex, java.sql.Date x)
          JDBC 2.0 Update a column with a Date value.
 void updateDate(java.lang.String columnName, java.sql.Date x)
          JDBC 2.0 Update a column with a Date value.
 void updateDouble(int columnIndex, double x)
          JDBC 2.0 Update a column with a Double value.
 void updateDouble(java.lang.String columnName, double x)
          JDBC 2.0 Update a column with a double value.
 void updateFloat(int columnIndex, float x)
          JDBC 2.0 Update a column with a float value.
 void updateFloat(java.lang.String columnName, float x)
          JDBC 2.0 Update a column with a float value.
 void updateInt(int columnIndex, int x)
          JDBC 2.0 Update a column with an integer value.
 void updateInt(java.lang.String columnName, int x)
          JDBC 2.0 Update a column with an integer value.
 void updateLong(int columnIndex, long x)
          JDBC 2.0 Update a column with a long value.
 void updateLong(java.lang.String columnName, long x)
          JDBC 2.0 Update a column with a long value.
 void updateNull(int columnIndex)
          JDBC 2.0 Give a nullable column a null value.
 void updateNull(java.lang.String columnName)
          JDBC 2.0 Update a column with a null value.
 void updateObject(int columnIndex, java.lang.Object x)
          JDBC 2.0 Update a column with an Object value.
 void updateObject(int columnIndex, java.lang.Object x, int scale)
          JDBC 2.0 Update a column with an Object value.
 void updateObject(java.lang.String columnName, java.lang.Object x)
          JDBC 2.0 Update a column with an Object value.
 void updateObject(java.lang.String columnName, java.lang.Object x, int scale)
          JDBC 2.0 Update a column with an Object value.
 void updateRef(int arg0, java.sql.Ref arg1)
           
 void updateRef(java.lang.String arg0, java.sql.Ref arg1)
           
 void updateRow()
          JDBC 2.0 Update the underlying database with the new contents of the current row.
 void updateShort(int columnIndex, short x)
          JDBC 2.0 Update a column with a short value.
 void updateShort(java.lang.String columnName, short x)
          JDBC 2.0 Update a column with a short value.
 void updateString(int columnIndex, java.lang.String x)
          JDBC 2.0 Update a column with a String value.
 void updateString(java.lang.String columnName, java.lang.String x)
          JDBC 2.0 Update a column with a String value.
 void updateTime(int columnIndex, java.sql.Time x)
          JDBC 2.0 Update a column with a Time value.
 void updateTime(java.lang.String columnName, java.sql.Time x)
          JDBC 2.0 Update a column with a Time value.
 void updateTimestamp(int columnIndex, java.sql.Timestamp x)
          JDBC 2.0 Update a column with a Timestamp value.
 void updateTimestamp(java.lang.String columnName, java.sql.Timestamp x)
          JDBC 2.0 Update a column with a Timestamp value.
 boolean wasNull()
          A column may have the value of SQL NULL; wasNull() reports whether the last column read had this special value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.sql.ResultSet
getHoldability, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getRowId, getRowId, getSQLXML, getSQLXML, isClosed, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateRowId, updateRowId, updateSQLXML, updateSQLXML
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Field Detail

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

protected static int resultCounter
Counter used to generate IDs for profiling.


catalog

protected java.lang.String catalog
The catalog that was in use when we were created


columnLabelToIndex

protected java.util.Map columnLabelToIndex
Map column names (and all of their permutations) to column indices


columnToIndexCache

protected java.util.Map 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 ConnectionImpl connection
The Connection instance that created us


connectionId

protected long connectionId

currentRow

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


defaultTimeZone

java.util.TimeZone defaultTimeZone

doingUpdates

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


eventSink

protected com.mysql.jdbc.profiler.ProfilerEventHandler eventSink

fastDateCal

java.util.Calendar fastDateCal

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 java.util.Map fullColumnNameToIndex
Map of fully-specified column names to column indices


columnNameToIndex

protected java.util.Map 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 java.lang.Throwable pointOfOrigin
StackTrace generated where ResultSet was created... used when profiling


profileSql

protected boolean profileSql
Are we tracking items for profileSql?


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 java.lang.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 java.sql.SQLWarning warningChain
The warning chain


wasNullFlag

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


wrapperStatement

protected java.sql.Statement wrapperStatement

retainOwningStatement

protected boolean retainOwningStatement

gmtCalendar

protected java.util.Calendar gmtCalendar

useFastDateParsing

protected boolean useFastDateParsing

EMPTY_SPACE

protected static final char[] EMPTY_SPACE

useLegacyDatetimeCode

protected boolean useLegacyDatetimeCode
Constructor Detail

ResultSetImpl

public ResultSetImpl(long updateCount,
                     long updateID,
                     ConnectionImpl 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 - DOCUMENT ME!
creatorStmt - DOCUMENT ME!

ResultSetImpl

public ResultSetImpl(java.lang.String catalog,
                     Field[] fields,
                     RowData tuples,
                     ConnectionImpl conn,
                     StatementImpl creatorStmt)
              throws java.sql.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 - DOCUMENT ME!
Throws:
java.sql.SQLException - if an error occurs
Method Detail

convertLongToUlong

protected static java.math.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,
                                           ConnectionImpl conn,
                                           StatementImpl creatorStmt)
                                    throws java.sql.SQLException
Throws:
java.sql.SQLException

getInstance

protected static ResultSetImpl getInstance(java.lang.String catalog,
                                           Field[] fields,
                                           RowData tuples,
                                           ConnectionImpl conn,
                                           StatementImpl creatorStmt,
                                           boolean isUpdatable)
                                    throws java.sql.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:
java.sql.SQLException

initializeWithMetadata

public void initializeWithMetadata()
                            throws java.sql.SQLException
Specified by:
initializeWithMetadata in interface ResultSetInternalMethods
Throws:
java.sql.SQLException

absolute

public boolean absolute(int row)
                 throws java.sql.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 java.sql.ResultSet
Parameters:
row - the row number to move to
Returns:
true if on the result set, false if off.
Throws:
java.sql.SQLException - if a database-access error occurs, or row is 0, or result set type is TYPE_FORWARD_ONLY.

afterLast

public void afterLast()
               throws java.sql.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 java.sql.ResultSet
Throws:
java.sql.SQLException - if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY.

beforeFirst

public void beforeFirst()
                 throws java.sql.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 java.sql.ResultSet
Throws:
java.sql.SQLException - if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY

buildIndexMapping

public void buildIndexMapping()
                       throws java.sql.SQLException
Builds a hash between column names and their indices for fast retrieval.

Specified by:
buildIndexMapping in interface ResultSetInternalMethods
Throws:
java.sql.SQLException

cancelRowUpdates

public void cancelRowUpdates()
                      throws java.sql.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 java.sql.ResultSet
Throws:
java.sql.SQLException - if a database-access error occurs, or if called when on the insert row.
NotUpdatable - DOCUMENT ME!

checkClosed

protected final void checkClosed()
                          throws java.sql.SQLException
Ensures that the result set is not closed

Throws:
java.sql.SQLException - if the result set is closed

checkColumnBounds

protected final void checkColumnBounds(int columnIndex)
                                throws java.sql.SQLException
Checks if columnIndex is within the number of columns in this result set.

Parameters:
columnIndex - the index to check
Throws:
java.sql.SQLException - if the index is out of bounds

checkRowPos

protected void checkRowPos()
                    throws java.sql.SQLException
Ensures that the cursor is positioned on a valid row and that the result set is not closed

Throws:
java.sql.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 java.sql.SQLException
After this call, getWarnings returns null until a new warning is reported for this ResultSet

Specified by:
clearWarnings in interface java.sql.ResultSet
Throws:
java.sql.SQLException - if a database access error occurs

close

public void close()
           throws java.sql.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 java.sql.ResultSet
Throws:
java.sql.SQLException - if a database access error occurs

copy

public ResultSetInternalMethods copy()
                              throws java.sql.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:
java.sql.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 java.sql.SQLException
Specified by:
populateCachedMetaData in interface ResultSetInternalMethods
Throws:
java.sql.SQLException

initializeFromCachedMetaData

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

deleteRow

public void deleteRow()
               throws java.sql.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 java.sql.ResultSet
Throws:
java.sql.SQLException - if a database-access error occurs, or if called when on the insert row.
NotUpdatable - DOCUMENT ME!

fastDateCreate

protected java.sql.Date fastDateCreate(java.util.Calendar cal,
                                       int year,
                                       int month,
                                       int day)

fastTimeCreate

protected java.sql.Time fastTimeCreate(java.util.Calendar cal,
                                       int hour,
                                       int minute,
                                       int second)
                                throws java.sql.SQLException
Throws:
java.sql.SQLException

fastTimestampCreate

protected java.sql.Timestamp fastTimestampCreate(java.util.Calendar cal,
                                                 int year,
                                                 int month,
                                                 int day,
                                                 int hour,
                                                 int minute,
                                                 int seconds,
                                                 int secondsPart)

findColumn

public int findColumn(java.lang.String columnName)
               throws java.sql.SQLException
Specified by:
findColumn in interface java.sql.ResultSet
Throws:
java.sql.SQLException

first

public boolean first()
              throws java.sql.SQLException
JDBC 2.0

Moves to the first row in the result set.

Specified by:
first in interface java.sql.ResultSet
Returns:
true if on a valid row, false if no rows in the result set.
Throws:
java.sql.SQLException - if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY.

getArray

public java.sql.Array getArray(int i)
                        throws java.sql.SQLException
JDBC 2.0 Get an array column.

Specified by:
getArray in interface java.sql.ResultSet
Parameters:
i - the first column is 1, the second is 2, ...
Returns:
an object representing an SQL array
Throws:
java.sql.SQLException - if a database error occurs
NotImplemented - DOCUMENT ME!

getArray

public java.sql.Array getArray(java.lang.String colName)
                        throws java.sql.SQLException
JDBC 2.0 Get an array column.

Specified by:
getArray in interface java.sql.ResultSet
Parameters:
colName - the column name
Returns:
an object representing an SQL array
Throws:
java.sql.SQLException - if a database error occurs
NotImplemented - DOCUMENT ME!

getAsciiStream

public java.io.InputStream getAsciiStream(int columnIndex)
                                   throws java.sql.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 java.sql.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:
java.sql.SQLException - if a database access error occurs
See Also:
getBinaryStream

getAsciiStream

public java.io.InputStream getAsciiStream(java.lang.String columnName)
                                   throws java.sql.SQLException
DOCUMENT ME!

Specified by:
getAsciiStream in interface java.sql.ResultSet
Parameters:
columnName - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.sql.SQLException - DOCUMENT ME!

getBigDecimal

public java.math.BigDecimal getBigDecimal(int columnIndex)
                                   throws java.sql.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 java.sql.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:
java.sql.SQLException - if a database-access error occurs.

getBigDecimal

public java.math.BigDecimal getBigDecimal(int columnIndex,
                                          int scale)
                                   throws java.sql.SQLException
Deprecated. 

Get the value of a column in the current row as a java.math.BigDecimal object

Specified by:
getBigDecimal in interface java.sql.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:
java.sql.SQLException - if a database access error occurs

getBigDecimal

public java.math.BigDecimal getBigDecimal(java.lang.String columnName)
                                   throws java.sql.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 java.sql.ResultSet
Parameters:
columnName - the name of the column to retrieve the value from
Returns:
the BigDecimal value in the column
Throws:
java.sql.SQLException - if an error occurs

getBigDecimal

public java.math.BigDecimal getBigDecimal(java.lang.String columnName,
                                          int scale)
                                   throws java.sql.SQLException
Deprecated. 

DOCUMENT ME!

Specified by:
getBigDecimal in interface java.sql.ResultSet
Parameters:
columnName - DOCUMENT ME!
scale - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.sql.SQLException - DOCUMENT ME!

getBinaryStream

public java.io.InputStream getBinaryStream(int columnIndex)
                                    throws java.sql.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 java.sql.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:
java.sql.SQLException - if a database access error occurs
See Also:
getAsciiStream, getUnicodeStream

getBinaryStream

public java.io.InputStream getBinaryStream(java.lang.String columnName)
                                    throws java.sql.SQLException
DOCUMENT ME!

Specified by:
getBinaryStream in interface java.sql.ResultSet
Parameters:
columnName - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.sql.SQLException - DOCUMENT ME!

getBlob

public java.sql.Blob getBlob(int columnIndex)
                      throws java.sql.SQLException
JDBC 2.0 Get a BLOB column.

Specified by:
getBlob in interface java.sql.ResultSet
Parameters:
columnIndex - the first column is 1, the second is 2, ...
Returns:
an object representing a BLOB
Throws:
java.sql.SQLException - if an error occurs.

getBlob

public java.sql.Blob getBlob(java.lang.String colName)
                      throws java.sql.SQLException
JDBC 2.0 Get a BLOB column.

Specified by:
getBlob in interface java.sql.ResultSet
Parameters:
colName - the column name
Returns:
an object representing a BLOB
Throws:
java.sql.SQLException - if an error occurs.

getBoolean

public boolean getBoolean(int columnIndex)
                   throws java.sql.SQLException
Get the value of a column in the current row as a Java boolean

Specified by:
getBoolean in interface java.sql.ResultSet
Parameters:
columnIndex - the first column is 1, the second is 2...
Returns:
the column value, false for SQL NULL
Throws:
java.sql.SQLException - if a database access error occurs

getBoolean

public boolean getBoolean(java.lang.String columnName)
                   throws java.sql.SQLException
DOCUMENT ME!

Specified by:
getBoolean in interface java.sql.ResultSet
Parameters:
columnName - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.sql.SQLException - DOCUMENT ME!

getByte

public byte getByte(int columnIndex)
             throws java.sql.SQLException
Get the value of a column in the current row as a Java byte.

Specified by:
getByte in interface java.sql.ResultSet
Parameters:
columnIndex - the first column is 1, the second is 2,...
Returns:
the column value; 0 if SQL NULL
Throws:
java.sql.SQLException - if a database access error occurs

getByte

public byte getByte(java.lang.String columnName)
             throws java.sql.SQLException
DOCUMENT ME!

Specified by:
getByte in interface java.sql.ResultSet
Parameters:
columnName - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.sql.SQLException - DOCUMENT ME!

getBytes

public byte[] getBytes(int columnIndex)
                throws java.sql.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 java.sql.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:
java.sql.SQLException - if a database access error occurs

getBytes

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

getBytes

public byte[] getBytes(java.lang.String columnName)
                throws java.sql.SQLException
DOCUMENT ME!

Specified by:
getBytes in interface java.sql.ResultSet
Parameters:
columnName - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.sql.SQLException - DOCUMENT ME!

getBytesSize

public int getBytesSize()
                 throws java.sql.SQLException
Specified by:
getBytesSize in interface ResultSetInternalMethods
Throws:
java.sql.SQLException

getCalendarInstanceForSessionOrNew

protected java.util.Calendar getCalendarInstanceForSessionOrNew()
Optimization to only use one calendar per-session, or calculate it for each call, depending on user configuration


getCharacterStream

public java.io.Reader getCharacterStream(int columnIndex)
                                  throws java.sql.SQLException
JDBC 2.0

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

Specified by:
getCharacterStream in interface java.sql.ResultSet
Parameters:
columnIndex - the column to get the value from
Returns:
the value in the column as a java.io.Reader.
Throws:
java.sql.SQLException - if an error occurs

getCharacterStream

public java.io.Reader getCharacterStream(java.lang.String columnName)
                                  throws java.sql.SQLException
JDBC 2.0

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

Specified by:
getCharacterStream in interface java.sql.ResultSet
Parameters:
columnName - the column name to retrieve the value from
Returns:
the value as a java.io.Reader
Throws:
java.sql.SQLException - if an error occurs

getClob

public java.sql.Clob getClob(int i)
                      throws java.sql.SQLException
JDBC 2.0 Get a CLOB column.

Specified by:
getClob in interface java.sql.ResultSet
Parameters:
i - the first column is 1, the second is 2, ...
Returns:
an object representing a CLOB
Throws:
java.sql.SQLException - if an error occurs

getClob

public java.sql.Clob getClob(java.lang.String colName)
                      throws java.sql.SQLException
JDBC 2.0 Get a CLOB column.

Specified by:
getClob in interface java.sql.ResultSet
Parameters:
colName - the column name
Returns:
an object representing a CLOB
Throws:
java.sql.SQLException - if an error occurs

getConcurrency

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

getCursorName

public java.lang.String getCursorName()
                               throws java.sql.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 java.sql.ResultSet
Returns:
the ResultSet's SQL cursor name.
Throws:
java.sql.SQLException - if a database access error occurs

getDate

public java.sql.Date getDate(int columnIndex)
                      throws java.sql.SQLException
Get the value of a column in the current row as a java.sql.Date object

Specified by:
getDate in interface java.sql.ResultSet
Parameters:
columnIndex - the first column is 1, the second is 2...
Returns:
the column value; null if SQL NULL
Throws:
java.sql.SQLException - if a database access error occurs

getDate

public java.sql.Date getDate(int columnIndex,
                             java.util.Calendar cal)
                      throws java.sql.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 java.sql.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:
java.sql.SQLException - if a database-access error occurs.

getDate

public java.sql.Date getDate(java.lang.String columnName)
                      throws java.sql.SQLException
DOCUMENT ME!

Specified by:
getDate in interface java.sql.ResultSet
Parameters:
columnName - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.sql.SQLException - DOCUMENT ME!

getDate

public java.sql.Date getDate(java.lang.String columnName,
                             java.util.Calendar cal)
                      throws java.sql.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 java.sql.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:
java.sql.SQLException - if a database-access error occurs.

getDouble

public double getDouble(int columnIndex)
                 throws java.sql.SQLException
Get the value of a column in the current row as a Java double.

Specified by:
getDouble in interface java.sql.ResultSet
Parameters:
columnIndex - the first column is 1, the second is 2,...
Returns:
the column value; 0 if SQL NULL
Throws:
java.sql.SQLException - if a database access error occurs

getDouble

public double getDouble(java.lang.String columnName)
                 throws java.sql.SQLException
DOCUMENT ME!

Specified by:
getDouble in interface java.sql.ResultSet
Parameters:
columnName - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.sql.SQLException - DOCUMENT ME!

getDoubleInternal

protected double getDoubleInternal(int colIndex)
                            throws java.sql.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:
java.sql.SQLException - if an error occurs

getDoubleInternal

protected double getDoubleInternal(java.lang.String stringVal,
                                   int colIndex)
                            throws java.sql.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:
java.sql.SQLException - if an error occurs

getFetchDirection

public int getFetchDirection()
                      throws java.sql.SQLException
JDBC 2.0 Returns the fetch direction for this result set.

Specified by:
getFetchDirection in interface java.sql.ResultSet
Returns:
the fetch direction for this result set.
Throws:
java.sql.SQLException - if a database-access error occurs

getFetchSize

public int getFetchSize()
                 throws java.sql.SQLException
JDBC 2.0 Return the fetch size for this result set.

Specified by:
getFetchSize in interface java.sql.ResultSet
Returns:
the fetch size for this result set.
Throws:
java.sql.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 java.sql.SQLException
Get the value of a column in the current row as a Java float.

Specified by:
getFloat in interface java.sql.ResultSet
Parameters:
columnIndex - the first column is 1, the second is 2,...
Returns:
the column value; 0 if SQL NULL
Throws:
java.sql.SQLException - if a database access error occurs

getFloat

public float getFloat(java.lang.String columnName)
               throws java.sql.SQLException
DOCUMENT ME!

Specified by:
getFloat in interface java.sql.ResultSet
Parameters:
columnName - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.sql.SQLException - DOCUMENT ME!

getInt

public int getInt(int columnIndex)
           throws java.sql.SQLException
Get the value of a column in the current row as a Java int.

Specified by:
getInt in interface java.sql.ResultSet
Parameters:
columnIndex - the first column is 1, the second is 2,...
Returns:
the column value; 0 if SQL NULL
Throws:
java.sql.SQLException - if a database access error occurs

getInt

public int getInt(java.lang.String columnName)
           throws java.sql.SQLException
DOCUMENT ME!

Specified by:
getInt in interface java.sql.ResultSet
Parameters:
columnName - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.sql.SQLException - DOCUMENT ME!

getLong

public long getLong(int columnIndex)
             throws java.sql.SQLException
Get the value of a column in the current row as a Java long.

Specified by:
getLong in interface java.sql.ResultSet
Parameters:
columnIndex - the first column is 1, the second is 2,...
Returns:
the column value; 0 if SQL NULL
Throws:
java.sql.SQLException - if a database access error occurs

getLong

public long getLong(java.lang.String columnName)
             throws java.sql.SQLException
DOCUMENT ME!

Specified by:
getLong in interface java.sql.ResultSet
Parameters:
columnName - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.sql.SQLException - DOCUMENT ME!

getMetaData

public java.sql.ResultSetMetaData getMetaData()
                                       throws java.sql.SQLException
The numbers, types and properties of a ResultSet's columns are provided by the getMetaData method

Specified by:
getMetaData in interface java.sql.ResultSet
Returns:
a description of the ResultSet's columns
Throws:
java.sql.SQLException - if a database access error occurs

getNativeArray

protected java.sql.Array getNativeArray(int i)
                                 throws java.sql.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:
java.sql.SQLException - if a database error occurs
NotImplemented - DOCUMENT ME!

getNativeAsciiStream

protected java.io.InputStream getNativeAsciiStream(int columnIndex)
                                            throws java.sql.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:
java.sql.SQLException - if a database access error occurs
See Also:
getBinaryStream

getNativeBigDecimal

protected java.math.BigDecimal getNativeBigDecimal(int columnIndex)
                                            throws java.sql.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:
java.sql.SQLException - if a database-access error occurs.

getNativeBigDecimal

protected java.math.BigDecimal getNativeBigDecimal(int columnIndex,
                                                   int scale)
                                            throws java.sql.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:
java.sql.SQLException - if a database access error occurs

getNativeBinaryStream

protected java.io.InputStream getNativeBinaryStream(int columnIndex)
                                             throws java.sql.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:
java.sql.SQLException - if a database access error occurs
See Also:
getAsciiStream, getUnicodeStream

getNativeBlob

protected java.sql.Blob getNativeBlob(int columnIndex)
                               throws java.sql.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:
java.sql.SQLException - if an error occurs.

arraysEqual

public static boolean arraysEqual(byte[] left,
                                  byte[] right)

getNativeByte

protected byte getNativeByte(int columnIndex)
                      throws java.sql.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:
java.sql.SQLException - if a database access error occurs

getNativeByte

protected byte getNativeByte(int columnIndex,
                             boolean overflowCheck)
                      throws java.sql.SQLException
Throws:
java.sql.SQLException

getNativeBytes

protected byte[] getNativeBytes(int columnIndex,
                                boolean noConversion)
                         throws java.sql.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:
java.sql.SQLException - if a database access error occurs

getNativeCharacterStream

protected java.io.Reader getNativeCharacterStream(int columnIndex)
                                           throws java.sql.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:
java.sql.SQLException - if an error occurs

getNativeClob

protected java.sql.Clob getNativeClob(int columnIndex)
                               throws java.sql.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:
java.sql.SQLException - if an error occurs

getNativeDate

protected java.sql.Date getNativeDate(int columnIndex)
                               throws java.sql.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:
java.sql.SQLException - if a database access error occurs

getNativeDate

protected java.sql.Date getNativeDate(int columnIndex,
                                      java.util.Calendar cal)
                               throws java.sql.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:
java.sql.SQLException - if a database-access error occurs.

getNativeDateViaParseConversion

java.sql.Date getNativeDateViaParseConversion(int columnIndex)
                                        throws java.sql.SQLException
Throws:
java.sql.SQLException

getNativeDouble

protected double getNativeDouble(int columnIndex)
                          throws java.sql.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:
java.sql.SQLException - if a database access error occurs

getNativeFloat

protected float getNativeFloat(int columnIndex)
                        throws java.sql.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:
java.sql.SQLException - if a database access error occurs

getNativeInt

protected int getNativeInt(int columnIndex)
                    throws java.sql.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:
java.sql.SQLException - if a database access error occurs

getNativeInt

protected int getNativeInt(int columnIndex,
                           boolean overflowCheck)
                    throws java.sql.SQLException
Throws:
java.sql.SQLException

getNativeLong

protected long getNativeLong(int columnIndex)
                      throws java.sql.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:
java.sql.SQLException - if a database access error occurs

getNativeLong

protected long getNativeLong(int columnIndex,
                             boolean overflowCheck,
                             boolean expandUnsignedLong)
                      throws java.sql.SQLException
Throws:
java.sql.SQLException

getNativeRef

protected java.sql.Ref getNativeRef(int i)
                             throws java.sql.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:
java.sql.SQLException - as this is not implemented
NotImplemented - DOCUMENT ME!

getNativeShort

protected short getNativeShort(int columnIndex)
                        throws java.sql.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:
java.sql.SQLException - if a database access error occurs

getNativeShort

protected short getNativeShort(int columnIndex,
                               boolean overflowCheck)
                        throws java.sql.SQLException
Throws:
java.sql.SQLException

getNativeString

protected java.lang.String getNativeString(int columnIndex)
                                    throws java.sql.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:
java.sql.SQLException - if a database access error occurs

getNativeTimeViaParseConversion

java.sql.Time getNativeTimeViaParseConversion(int columnIndex,
                                              java.util.Calendar targetCalendar,
                                              java.util.TimeZone tz,
                                              boolean rollForward)
                                        throws java.sql.SQLException
Throws:
java.sql.SQLException

getNativeTimestampViaParseConversion

java.sql.Timestamp getNativeTimestampViaParseConversion(int columnIndex,
                                                        java.util.Calendar targetCalendar,
                                                        java.util.TimeZone tz,
                                                        boolean rollForward)
                                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

getNativeUnicodeStream

protected java.io.InputStream getNativeUnicodeStream(int columnIndex)
                                              throws java.sql.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:
java.sql.SQLException - if a database access error occurs
See Also:
getAsciiStream, getBinaryStream

getNativeURL

protected java.net.URL getNativeURL(int colIndex)
                             throws java.sql.SQLException
Throws:
java.sql.SQLException
See Also:
ResultSet.getURL(int)

getNextResultSet

public ResultSetInternalMethods getNextResultSet()
DOCUMENT ME!

Specified by:
getNextResultSet in interface ResultSetInternalMethods
Returns:
Returns the nextResultSet, if any, null if none exists.

getObject

public java.lang.Object getObject(int columnIndex)
                           throws java.sql.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 java.sql.ResultSet
Parameters:
columnIndex - the first column is 1, the second is 2...
Returns:
a Object holding the column value
Throws:
java.sql.SQLException - if a database access error occurs

getObject

public java.lang.Object getObject(int i,
                                  java.util.Map map)
                           throws java.sql.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 java.sql.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:
java.sql.SQLException - because this is not implemented

getObject

public java.lang.Object getObject(java.lang.String columnName)
                           throws java.sql.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 java.sql.ResultSet
Parameters:
columnName - is the SQL name of the column
Returns:
a Object holding the column value
Throws:
java.sql.SQLException - if a database access error occurs

getObject

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

getObjectStoredProc

public java.lang.Object getObjectStoredProc(int columnIndex,
                                            int desiredSqlType)
                                     throws java.sql.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:
java.sql.SQLException

getObjectStoredProc

public java.lang.Object getObjectStoredProc(int i,
                                            java.util.Map map,
                                            int desiredSqlType)
                                     throws java.sql.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:
java.sql.SQLException

getObjectStoredProc

public java.lang.Object getObjectStoredProc(java.lang.String columnName,
                                            int desiredSqlType)
                                     throws java.sql.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:
java.sql.SQLException

getObjectStoredProc

public java.lang.Object getObjectStoredProc(java.lang.String colName,
                                            java.util.Map map,
                                            int desiredSqlType)
                                     throws java.sql.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:
java.sql.SQLException

getRef

public java.sql.Ref getRef(int i)
                    throws java.sql.SQLException
JDBC 2.0 Get a REF(<structured-type>) column.

Specified by:
getRef in interface java.sql.ResultSet
Parameters:
i - the first column is 1, the second is 2, ...
Returns:
an object representing data of an SQL REF type
Throws:
java.sql.SQLException - as this is not implemented
NotImplemented - DOCUMENT ME!

getRef

public java.sql.Ref getRef(java.lang.String colName)
                    throws java.sql.SQLException
JDBC 2.0 Get a REF(<structured-type>) column.

Specified by:
getRef in interface java.sql.ResultSet
Parameters:
colName - the column name
Returns:
an object representing data of an SQL REF type
Throws:
java.sql.SQLException - as this method is not implemented.
NotImplemented - DOCUMENT ME!

getRow

public int getRow()
           throws java.sql.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 java.sql.ResultSet
Returns:
the current row number, else return 0 if there is no current row
Throws:
java.sql.SQLException - if a database-access error occurs.

getServerInfo

public java.lang.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 java.sql.SQLException
Get the value of a column in the current row as a Java short.

Specified by:
getShort in interface java.sql.ResultSet
Parameters:
columnIndex - the first column is 1, the second is 2,...
Returns:
the column value; 0 if SQL NULL
Throws:
java.sql.SQLException - if a database access error occurs

getShort

public short getShort(java.lang.String columnName)
               throws java.sql.SQLException
DOCUMENT ME!

Specified by:
getShort in interface java.sql.ResultSet
Parameters:
columnName - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.sql.SQLException - DOCUMENT ME!

getStatement

public java.sql.Statement getStatement()
                                throws java.sql.SQLException
JDBC 2.0 Return the Statement that produced the ResultSet.

Specified by:
getStatement in interface java.sql.ResultSet
Returns:
the Statment that produced the result set, or null if the result was produced some other way.
Throws:
java.sql.SQLException - if a database-access error occurs

getString

public java.lang.String getString(int columnIndex)
                           throws java.sql.SQLException
Get the value of a column in the current row as a Java String

Specified by:
getString in interface java.sql.ResultSet
Parameters:
columnIndex - the first column is 1, the second is 2...
Returns:
the column value, null for SQL NULL
Throws:
java.sql.SQLException - if a database access error occurs

getString

public java.lang.String getString(java.lang.String columnName)
                           throws java.sql.SQLException
The following routines simply convert the columnName into a columnIndex and then call the appropriate routine above.

Specified by:
getString in interface java.sql.ResultSet
Parameters:
columnName - is the SQL name of the column
Returns:
the column value
Throws:
java.sql.SQLException - if a database access error occurs

getStringInternal

protected java.lang.String getStringInternal(int columnIndex,
                                             boolean checkDateTypes)
                                      throws java.sql.SQLException
Throws:
java.sql.SQLException

getTime

public java.sql.Time getTime(int columnIndex)
                      throws java.sql.SQLException
Get the value of a column in the current row as a java.sql.Time object

Specified by:
getTime in interface java.sql.ResultSet
Parameters:
columnIndex - the first column is 1, the second is 2...
Returns:
the column value; null if SQL NULL
Throws:
java.sql.SQLException - if a database access error occurs

getTime

public java.sql.Time getTime(int columnIndex,
                             java.util.Calendar cal)
                      throws java.sql.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 java.sql.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:
java.sql.SQLException - if a database-access error occurs.

getTime

public java.sql.Time getTime(java.lang.String columnName)
                      throws java.sql.SQLException
Get the value of a column in the current row as a java.sql.Time object.

Specified by:
getTime in interface java.sql.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:
java.sql.SQLException - if a database-access error occurs.

getTime

public java.sql.Time getTime(java.lang.String columnName,
                             java.util.Calendar cal)
                      throws java.sql.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 java.sql.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:
java.sql.SQLException - if a database-access error occurs.

getTimestamp

public java.sql.Timestamp getTimestamp(int columnIndex)
                                throws java.sql.SQLException
Get the value of a column in the current row as a java.sql.Timestamp object

Specified by:
getTimestamp in interface java.sql.ResultSet
Parameters:
columnIndex - the first column is 1, the second is 2...
Returns:
the column value; null if SQL NULL
Throws:
java.sql.SQLException - if a database access error occurs

getTimestamp

public java.sql.Timestamp getTimestamp(int columnIndex,
                                       java.util.Calendar cal)
                                throws java.sql.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 java.sql.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:
java.sql.SQLException - if a database-access error occurs.

getTimestamp

public java.sql.Timestamp getTimestamp(java.lang.String columnName)
                                throws java.sql.SQLException
DOCUMENT ME!

Specified by:
getTimestamp in interface java.sql.ResultSet
Parameters:
columnName - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.sql.SQLException - DOCUMENT ME!

getTimestamp

public java.sql.Timestamp getTimestamp(java.lang.String columnName,
                                       java.util.Calendar cal)
                                throws java.sql.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 java.sql.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:
java.sql.SQLException - if a database-access error occurs.

getType

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

getUnicodeStream

public java.io.InputStream getUnicodeStream(int columnIndex)
                                     throws java.sql.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 java.sql.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:
java.sql.SQLException - if a database access error occurs
See Also:
getAsciiStream, getBinaryStream

getUnicodeStream

public java.io.InputStream getUnicodeStream(java.lang.String columnName)
                                     throws java.sql.SQLException
Deprecated. 

DOCUMENT ME!

Specified by:
getUnicodeStream in interface java.sql.ResultSet
Parameters:
columnName - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.sql.SQLException - DOCUMENT ME!

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 java.net.URL getURL(int colIndex)
                    throws java.sql.SQLException
Specified by:
getURL in interface java.sql.ResultSet
Throws:
java.sql.SQLException
See Also:
ResultSet.getURL(int)

getURL

public java.net.URL getURL(java.lang.String colName)
                    throws java.sql.SQLException
Specified by:
getURL in interface java.sql.ResultSet
Throws:
java.sql.SQLException
See Also:
ResultSet.getURL(String)

getWarnings

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

insertRow

public void insertRow()
               throws java.sql.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 java.sql.ResultSet
Throws:
java.sql.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 - DOCUMENT ME!

isAfterLast

public boolean isAfterLast()
                    throws java.sql.SQLException
JDBC 2.0

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

Specified by:
isAfterLast in interface java.sql.ResultSet
Returns:
true if after the last row, false otherwise. Returns false when the result set contains no rows.
Throws:
java.sql.SQLException - if a database-access error occurs.

isBeforeFirst

public boolean isBeforeFirst()
                      throws java.sql.SQLException
JDBC 2.0

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

Specified by:
isBeforeFirst in interface java.sql.ResultSet
Returns:
true if before the first row, false otherwise. Returns false when the result set contains no rows.
Throws:
java.sql.SQLException - if a database-access error occurs.

isFirst

public boolean isFirst()
                throws java.sql.SQLException
JDBC 2.0

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

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

isLast

public boolean isLast()
               throws java.sql.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 java.sql.ResultSet
Returns:
true if on the last row, false otherwise.
Throws:
java.sql.SQLException - if a database-access error occurs.

last

public boolean last()
             throws java.sql.SQLException
JDBC 2.0

Moves to the last row in the result set.

Specified by:
last in interface java.sql.ResultSet
Returns:
true if on a valid row, false if no rows in the result set.
Throws:
java.sql.SQLException - if a database-access error occurs, or result set type is TYPE_FORWARD_ONLY.

moveToCurrentRow

public void moveToCurrentRow()
                      throws java.sql.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 java.sql.ResultSet
Throws:
java.sql.SQLException - if a database-access error occurs, or the result set is not updatable
NotUpdatable - DOCUMENT ME!

moveToInsertRow

public void moveToInsertRow()
                     throws java.sql.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 java.sql.ResultSet
Throws:
java.sql.SQLException - if a database-access error occurs, or the result set is not updatable
NotUpdatable - DOCUMENT ME!

next

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

prev

public boolean prev()
             throws java.sql.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:
java.sql.SQLException - if a database access error occurs

previous

public boolean previous()
                 throws java.sql.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 java.sql.ResultSet
Returns:
true if on a valid row, false if off the result set.
Throws:
java.sql.SQLException - if a database-access error occurs, or result set type is TYPE_FORWAR_DONLY.

realClose

public void realClose(boolean calledExplicitly)
               throws java.sql.SQLException
Closes this ResultSet and releases resources.

Specified by:
realClose in interface ResultSetInternalMethods
Parameters:
calledExplicitly - was this called by close()?
Throws:
java.sql.SQLException - if an error occurs

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 java.sql.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 java.sql.ResultSet
Throws:
java.sql.SQLException - if a database-access error occurs, or if called when on the insert row.
NotUpdatable - DOCUMENT ME!

relative

public boolean relative(int rows)
                 throws java.sql.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 java.sql.ResultSet
Parameters:
rows - the number of relative rows to move the cursor.
Returns:
true if on a row, false otherwise.
Throws:
java.sql.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 java.sql.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 java.sql.ResultSet
Returns:
true if deleted and deletes are detected
Throws:
java.sql.SQLException - if a database-access error occurs
NotImplemented - DOCUMENT ME!
See Also:
DatabaseMetaData.deletesAreDetected(int)

rowInserted

public boolean rowInserted()
                    throws java.sql.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 java.sql.ResultSet
Returns:
true if inserted and inserts are detected
Throws:
java.sql.SQLException - if a database-access error occurs
NotImplemented - DOCUMENT ME!
See Also:
DatabaseMetaData.insertsAreDetected(int)

rowUpdated

public boolean rowUpdated()
                   throws java.sql.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 java.sql.ResultSet
Returns:
true if the row has been visibly updated by the owner or another, and updates are detected
Throws:
java.sql.SQLException - if a database-access error occurs
NotImplemented - DOCUMENT ME!
See Also:
DatabaseMetaData.updatesAreDetected(int)

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 java.sql.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 java.sql.ResultSet
Parameters:
direction - the direction to fetch rows in.
Throws:
java.sql.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 java.sql.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 java.sql.ResultSet
Parameters:
rows - the number of rows to fetch
Throws:
java.sql.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)
DOCUMENT ME!

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(java.lang.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(java.sql.Statement wrapperStatement)
Specified by:
setWrapperStatement in interface ResultSetInternalMethods
Parameters:
wrapperStatement - The wrapperStatement to set.

toString

public java.lang.String toString()
DOCUMENT ME!

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!

updateArray

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

updateArray

public void updateArray(java.lang.String arg0,
                        java.sql.Array arg1)
                 throws java.sql.SQLException
Specified by:
updateArray in interface java.sql.ResultSet
Throws:
java.sql.SQLException
See Also:
ResultSet.updateArray(String, Array)

updateAsciiStream

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

updateAsciiStream

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

updateBigDecimal

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

updateBigDecimal

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

updateBinaryStream

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

updateBinaryStream

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

updateBlob

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

updateBlob

public void updateBlob(java.lang.String arg0,
                       java.sql.Blob arg1)
                throws java.sql.SQLException
Specified by:
updateBlob in interface java.sql.ResultSet
Throws:
java.sql.SQLException
See Also:
ResultSet.updateBlob(String, Blob)

updateBoolean

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

updateBoolean

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

updateByte

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

updateByte

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

updateBytes

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

updateBytes

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

updateCharacterStream

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

updateCharacterStream

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

updateClob

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

updateClob

public void updateClob(java.lang.String columnName,
                       java.sql.Clob clob)
                throws java.sql.SQLException
Specified by:
updateClob in interface java.sql.ResultSet
Throws:
java.sql.SQLException
See Also:
ResultSet.updateClob(String, Clob)

updateDate

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

updateDate

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

updateDouble

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

updateDouble

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

updateFloat

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

updateFloat

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

updateInt

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

updateInt

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

updateLong

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

updateLong

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

updateNull

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

updateNull

public void updateNull(java.lang.String columnName)
                throws java.sql.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 java.sql.ResultSet
Parameters:
columnName - the name of the column
Throws:
java.sql.SQLException - if a database-access error occurs

updateObject

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

updateObject

public void updateObject(int columnIndex,
                         java.lang.Object x,
                         int scale)
                  throws java.sql.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 java.sql.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:
java.sql.SQLException - if a database-access error occurs
NotUpdatable - DOCUMENT ME!

updateObject

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

updateObject

public void updateObject(java.lang.String columnName,
                         java.lang.Object x,
                         int scale)
                  throws java.sql.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 java.sql.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:
java.sql.SQLException - if a database-access error occurs

updateRef

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

updateRef

public void updateRef(java.lang.String arg0,
                      java.sql.Ref arg1)
               throws java.sql.SQLException
Specified by:
updateRef in interface java.sql.ResultSet
Throws:
java.sql.SQLException
See Also:
ResultSet.updateRef(String, Ref)

updateRow

public void updateRow()
               throws java.sql.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 java.sql.ResultSet
Throws:
java.sql.SQLException - if a database-access error occurs, or if called when on the insert row
NotUpdatable - DOCUMENT ME!

updateShort

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

updateShort

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

updateString

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

updateString

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

updateTime

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

updateTime

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

updateTimestamp

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

updateTimestamp

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

wasNull

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

getGmtCalendar

protected java.util.Calendar getGmtCalendar()

getExceptionInterceptor

protected ExceptionInterceptor getExceptionInterceptor()