|
Mimer JDBC Engine 2.12 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--com.mimer.jdbc.ResultSet
Represents a result set, either forward only or scrollable.
The below table shows which Mimer SQL server data types are accessible from the
specified JDBC getter methods. Those data types that may be retrieved using a specific getter
method may also be set using the corresponding setter method with a PreparedStatement
object.
| OT | SI | IN | N(n) | BI | RE | FL | FL(n) | DP | DC | NU | BI | CH | CV | BI | BV | NCH | NCV | DT | TI | TS | IV | IV2 | BL | CL | NCL | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| getByte | X | x | x | x | x | x | x | x | x | x | x | x | x | x | - | - | x | x | - | - | - | - | - | - | - | - |
| getShort | x | X | x | x | x | x | x | x | x | x | x | x | x | x | - | - | x | x | - | - | - | - | - | - | - | - |
| getInt | x | x | X | x | x | x | x | x | x | x | x | x | x | x | - | - | x | x | - | - | - | - | - | - | - | - |
| getLong | x | x | x | x | X | x | x | x | x | x | x | x | x | x | - | - | x | x | - | - | - | - | - | - | - | - |
| getFloat | x | x | x | x | x | X | x | x | x | x | x | x | x | x | - | - | x | x | - | - | - | - | - | - | - | - |
| getDouble | x | x | x | x | x | x | X | X | X | x | x | x | x | x | - | - | x | x | - | - | - | - | - | - | - | - |
| getBigDecimal | x | x | x | x | x | x | x | x | x | X | X | x | x | x | - | - | x | x | - | - | - | - | - | - | - | - |
| getBoolean | x | x | x | x | x | x | x | x | x | x | x | X | x | x | - | - | x | x | - | - | - | - | - | - | - | - |
| getString | x | x | x | x | x | x | x | x | x | x | x | x | X | X | - | - | x | x | x | x | x | x | x | - | - | - |
| getBytes | - | - | - | - | - | - | - | - | - | - | - | - | - | - | X | X | - | - | - | - | - | - | - | - | - | - |
| getDate | - | - | - | - | - | - | - | - | - | - | - | - | x | x | - | - | x | x | X | x | x | - | - | - | - | - |
| getTime | - | - | - | - | - | - | - | - | - | - | - | - | x | x | - | - | x | x | x | X | x | - | - | - | - | - |
| getTimestamp | - | - | - | - | - | - | - | - | - | - | - | - | x | x | - | - | x | x | x | x | X | - | - | - | - | - |
| getAsciiStream | - | - | - | - | - | - | - | - | - | - | - | - | x | x | x | x | x | x | - | - | - | - | - | - | x | x |
| getBinaryStream | - | - | - | - | - | - | - | - | - | - | - | - | - | - | x | x | - | - | - | - | - | - | - | x | - | - |
| getCharacterStream | - | - | - | - | - | - | - | - | - | - | - | - | x | x | - | - | x | x | - | - | - | - | - | - | x | x |
| getClob | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | x | x |
| getBlob | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | x | - | - |
| getArray | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
| getRef | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
| getURL | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
| getObject | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x |
Abbreviations in table above:
| Field Summary |
| 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 |
| Method Summary | |
boolean |
absolute(int row)
Positions the cursor on a absolute position. |
void |
afterLast()
Positions the cursor after the end of the result set. |
void |
beforeFirst()
Positions the cursor before the beginning of the result set. |
void |
cancelRowUpdates()
Cancels the updates made to the current row in this ResultSet object.
|
void |
clearWarnings()
Clears all warnings reported on the object. |
void |
close()
Closes the statement. |
void |
deleteRow()
Deletes the current row from this ResultSet object
and from the underlying database. |
int |
findColumn(String columnName)
Finds a column index from a column name. |
boolean |
first()
Positions the cursor at the first row of the result set. |
Array |
getArray(int columnIndex)
Get an SQL array. |
Array |
getArray(String columnName)
Get an SQL array. |
InputStream |
getAsciiStream(int columnIndex)
Returns an ascii stream representing the result set column. |
InputStream |
getAsciiStream(String columnName)
Returns an ascii stream representing the result set column. |
BigDecimal |
getBigDecimal(int columnIndex)
Returns a java.math.BigDecimal object without scale. |
BigDecimal |
getBigDecimal(int columnIndex,
int scale)
Returns a java.math.BigDecimal object. |
BigDecimal |
getBigDecimal(String columnName)
Returns a java.math.BigDecimal object. |
BigDecimal |
getBigDecimal(String columnName,
int scale)
Returns a java.math.BigDecimal object. |
InputStream |
getBinaryStream(int columnIndex)
Returns an binary stream representing the result set column. |
InputStream |
getBinaryStream(String columnName)
Returns an binary stream representing the result set column. |
Blob |
getBlob(int columnIndex)
Get a BLOB LOCATOR object. |
Blob |
getBlob(String columnName)
Get a BLOB LOCATOR object. |
boolean |
getBoolean(int columnIndex)
Returns a boolean. |
boolean |
getBoolean(String columnName)
Returns a boolean. |
byte |
getByte(int columnIndex)
Returns a byte. |
byte |
getByte(String columnName)
Returns a byte. |
byte[] |
getBytes(int columnIndex)
Returns an array of bytes. |
byte[] |
getBytes(String columnName)
Returns an array of bytes. |
Reader |
getCharacterStream(int columnIndex)
Get a character stream. |
Reader |
getCharacterStream(String columnName)
Get a character stream. |
Clob |
getClob(int columnIndex)
Get a CLOB LOCATOR object. |
Clob |
getClob(String columnName)
Get a CLOB LOCATOR object. |
int |
getConcurrency()
Returns the concurrency mode for this result set. |
String |
getCursorName()
Returns the name of this cursor. |
Date |
getDate(int columnIndex)
Returns a Date. |
Date |
getDate(int columnIndex,
Calendar cal)
Get a date with timezone compensation. |
Date |
getDate(String columnName)
Return a date. |
Date |
getDate(String columnName,
Calendar cal)
Get a date with timezone compensation. |
double |
getDouble(int columnIndex)
Returns a double. |
double |
getDouble(String columnName)
Returns a double. |
int |
getFetchDirection()
Gets the current fetch direction hint. |
int |
getFetchSize()
Retrieves the current fetch size. |
float |
getFloat(int columnIndex)
Returns a float. |
float |
getFloat(String columnName)
Returns a float. |
int |
getInt(int columnIndex)
Returns an integer. |
int |
getInt(String columnName)
Returns an integer. |
long |
getLong(int columnIndex)
Returns an long. |
long |
getLong(String columnName)
Returns an long. |
ResultSetMetaData |
getMetaData()
Returns a ResultSetMetaData object describing the result set. |
Object |
getObject(int columnIndex)
Returns an object. |
Object |
getObject(int columnIndex,
Map map)
Get object with type map. |
Object |
getObject(String columnName)
Returns an object. |
Object |
getObject(String columnName,
Map map)
Get object with type map. |
Ref |
getRef(int columnIndex)
Get a reference type. |
Ref |
getRef(String columnName)
Get a reference type. |
int |
getRow()
Return the current row number. |
short |
getShort(int columnIndex)
Returns a short. |
short |
getShort(String columnName)
Returns a short. |
Statement |
getStatement()
Get the statement that belongs to this result set. |
String |
getString(int columnIndex)
Returns a string. |
String |
getString(String columnName)
Returns a string. |
Time |
getTime(int columnIndex)
Returns a time. |
Time |
getTime(int columnIndex,
Calendar cal)
Get a time with timezone compensation. |
Time |
getTime(String columnName)
Returns a time. |
Time |
getTime(String columnName,
Calendar cal)
Get a time with timezone compensation. |
Timestamp |
getTimestamp(int columnIndex)
Returns a timestamp. |
Timestamp |
getTimestamp(int columnIndex,
Calendar cal)
Get a timestamp with timezone compensation. |
Timestamp |
getTimestamp(String columnName)
Returns a time. |
Timestamp |
getTimestamp(String columnName,
Calendar cal)
Get a timestamp with timezone compensation. |
int |
getType()
Return the type of the result set. |
InputStream |
getUnicodeStream(int columnIndex)
|
InputStream |
getUnicodeStream(String columnName)
|
SQLWarning |
getWarnings()
Returns the first warning posted to this object. |
void |
insertRow()
Inserts the contents of the insert row into this ResultSet object and into the database.
|
boolean |
isAfterLast()
Returns true if the current row is after the last row of the result set. |
boolean |
isBeforeFirst()
Returns true if the current row is before the first row of the result set. |
boolean |
isFirst()
Returns true if the current row is at the first row of the result set. |
boolean |
isLast()
Returns true if the current row is at the last row of the result set. |
boolean |
last()
Positions the cursor on the last row of the result set. |
void |
moveToCurrentRow()
Moves the cursor to the remembered cursor position, usually the current row. |
void |
moveToInsertRow()
Moves the cursor to the insert row. |
boolean |
next()
Moves on to the next row in the result set. |
boolean |
previous()
Positions the cursor one row backwards in the result set. |
void |
refreshRow()
The refreshRow method provides a way for an
application to
explicitly tell the JDBC driver to refetch a row(s) from the
database.
|
boolean |
relative(int rows)
Positioning relative to the current cursor position. |
boolean |
rowDeleted()
Indicates whether a row has been deleted. |
boolean |
rowInserted()
Indicates whether the current row has had an insertion. |
boolean |
rowUpdated()
Indicates whether the current row has been updated. |
void |
setFetchDirection(int direction)
Sets the current fetch direction hint. |
void |
setFetchSize(int rows)
Sets the current fetch size. |
void |
updateAsciiStream(int columnIndex,
InputStream x,
int length)
Updates the designated column with an ascii stream value. |
void |
updateAsciiStream(String columnName,
InputStream x,
int length)
Updates the designated column with an ascii stream value. |
void |
updateBigDecimal(int columnIndex,
BigDecimal x)
Updates the designated column with a java.math.BigDecimal
value.
|
void |
updateBigDecimal(String columnName,
BigDecimal x)
Updates the designated column with a java.math.BigDecimal
value.
|
void |
updateBinaryStream(int columnIndex,
InputStream x,
int length)
Updates the designated column with a binary stream value. |
void |
updateBinaryStream(String columnName,
InputStream x,
int length)
Updates the designated column with a binary stream value. |
void |
updateBoolean(int columnIndex,
boolean x)
Updates the designated column with a boolean value.
|
void |
updateBoolean(String columnName,
boolean x)
Updates the designated column with a boolean value.
|
void |
updateByte(int columnIndex,
byte x)
Updates the designated column with a byte value.
|
void |
updateByte(String columnName,
byte x)
Updates the designated column with a byte value.
|
void |
updateBytes(int columnIndex,
byte[] x)
Updates the designated column with a byte array value.
|
void |
updateBytes(String columnName,
byte[] x)
Updates the designated column with a byte array value.
|
void |
updateCharacterStream(int columnIndex,
Reader x,
int length)
Updates the designated column with a character stream value. |
void |
updateCharacterStream(String columnName,
Reader x,
int length)
Updates the designated column with a character stream value. |
void |
updateDate(int columnIndex,
Date x)
Updates the designated column with a java.sql.Date value.
|
void |
updateDate(String columnName,
Date x)
Updates the designated column with a java.sql.Date value.
|
void |
updateDouble(int columnIndex,
double x)
Updates the designated column with a double value.
|
void |
updateDouble(String columnName,
double x)
Updates the designated column with a double value.
|
void |
updateFloat(int columnIndex,
float x)
Updates the designated column with a float value.
|
void |
updateFloat(String columnName,
float x)
Updates the designated column with a float value.
|
void |
updateInt(int columnIndex,
int x)
Updates the designated column with an int value.
|
void |
updateInt(String columnName,
int x)
Updates the designated column with an int value.
|
void |
updateLong(int columnIndex,
long x)
Updates the designated column with a long value.
|
void |
updateLong(String columnName,
long x)
Updates the designated column with a long value.
|
void |
updateNull(int columnIndex)
Gives a nullable column a null value. |
void |
updateNull(String columnName)
Gives a nullable column a null value. |
void |
updateObject(int columnIndex,
Object x)
Updates the designated column with an Object value.
|
void |
updateObject(int columnIndex,
Object x,
int scale)
Updates the designated column with an Object value.
|
void |
updateObject(String columnName,
Object x)
Updates the designated column with an Object value.
|
void |
updateObject(String columnName,
Object x,
int scale)
Updates the designated column with an Object value.
|
void |
updateRow()
Updates the underlying database with the new contents of the current row of this ResultSet object.
|
void |
updateShort(int columnIndex,
short x)
Updates the designated column with a short value.
|
void |
updateShort(String columnName,
short x)
Updates the designated column with a short value.
|
void |
updateString(int columnIndex,
String x)
Updates the designated column with a String value.
|
void |
updateString(String columnName,
String x)
Updates the designated column with a String value.
|
void |
updateTime(int columnIndex,
Time x)
Updates the designated column with a java.sql.Time value.
|
void |
updateTime(String columnName,
Time x)
Updates the designated column with a java.sql.Time value.
|
void |
updateTimestamp(int columnIndex,
Timestamp x)
Updates the designated column with a java.sql.Timestamp
value.
|
void |
updateTimestamp(String columnName,
Timestamp x)
Updates the designated column with a java.sql.Timestamp
value.
|
boolean |
wasNull()
Returns true if the last column read was a NULL. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.sql.ResultSet |
getURL, getURL, updateArray, updateArray, updateBlob, updateBlob, updateClob, updateClob, updateRef, updateRef |
| Method Detail |
public boolean absolute(int row)
throws SQLException
Performance consideration: If the application calls ResultSet.absolute
to position itself to a particular row, the entire result set up to that point has
to mbecome materialized on the server. This means that positioning far ahead in the result
set might take some time, but returning to a position once visited is fast. For example:
ResultSet is created.ResultSet is advanced one row at a time until the 10th row.ResultSet.absolute(1000000) is called. At this time, only the beginning of
the result set has been formed. To get to row 1000000 the server has to materialize all
rows up to that point. This can take a while.ResultSet.absolute(100) is called. This row has already been formed, so returning
to it should be nearly instantaneous.ResultSet.absolute(1000000) is called. This row has also already been formed, so
returning to it is also nearly instantaneous.In some situations, the entire result set is formed before the first row can be returned. An example of such a situation is when we have an ORDER BY clause on a non-indexed column. If this is so, we experience the penalty of forming the entire result set before the first row is returned, and then we don't see the effects outlined above.
absolute in interface ResultSetrow - If positive it is an absolute position from the start of the result set.
If negative it is a absolute position coutned from the end of the result set.
SQLException - if an error occurs. SQLSTATE HY109 is thrown if this is a forward-only result set.
HY107 is thrown if the row parameter was 0.
public void afterLast()
throws SQLException
Performance consideration: If the end of result set hasn't been formed before, this operation may take some time since all rows up until the end of the result set has be formed on the server. The only workaround for this is to work with smaller result sets.
afterLast in interface ResultSetSQLException - if an error occurs. SQLSTATE HY109 is thrown if this is a forward-only result set.
public void beforeFirst()
throws SQLException
beforeFirst in interface ResultSetSQLException - if an error occurs. SQLSTATE HY109 is thrown if this is a forward-only result set.
public void cancelRowUpdates()
throws SQLException
ResultSet object.
Mimer SQL currently don't support updatable cursors. Use positioned UPDATE/DELETE:s instead.
cancelRowUpdates in interface ResultSetSQLException - if a database access error
occurs or if this method is called when the cursor is on the insert row
public void clearWarnings()
throws SQLException
clearWarnings in interface ResultSetSQLException - if an error occurs.
public void close()
throws SQLException
close in interface ResultSetSQLException - if an error occurs.
public void deleteRow()
throws SQLException
ResultSet object
and from the underlying database. This method cannot be called when
the cursor is on the insert row.
Mimer SQL currently don't support updatable cursors. Use positioned UPDATE/DELETE:s instead.
deleteRow in interface ResultSetSQLException - if a database access error occurs
or if this method is called when the cursor is on the insert row
public int findColumn(String columnName)
throws SQLException
findColumn in interface ResultSetcolumnName - The column name.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the result set is not open. 07009 is thrown if the column name doesn't exist.
public boolean first()
throws SQLException
first in interface ResultSetSQLException - if an error occurs. SQLSTATE HY109 is thrown if this is a forward-only result set.
public Array getArray(int columnIndex)
throws SQLException
Mimer SQL (as of 9.2) does not support SQL arrays. This method will always throw an error.
getArray in interface ResultSetcolumnIndex - The column index.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the cursor is not open. 24000 is thrown if the cursor is not located on a valid row. 07009 is thrown if the columnIndex is not valid. 2200G is thrown if the column type wasn't castable to a string, see ResultSet for an overview of which column types are castable to which Java types.
public Array getArray(String columnName)
throws SQLException
Mimer SQL (as of 9.2) does not support SQL arrays. This method will always throw an error.
getArray in interface ResultSetcolumnName - The column name.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the cursor is not open. 24000 is thrown if the cursor is not located on a valid row. 07009 is thrown if the columnName is not valid. 2200G is thrown if the column type wasn't castable to a string, see ResultSet for an overview of which column types are castable to which Java types.
public InputStream getAsciiStream(int columnIndex)
throws SQLException
Performance consideration: When calling this method on a CLOB or NCLOB server column, this call
makes a separate server call to retrieve the object. This is different from all other data types, since they
are fully transferred to the client no later when the cursor is moved to the current column. If you only wish
to keep a reference to the CLOB or NCLOB for later use, please consider using the ResultSet.getClob
since this only returns a LOCATOR reference to the object, and no server calls are being made.
getAsciiStream in interface ResultSetcolumnIndex - The column number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the cursor is not open. 24000 is thrown if the cursor is not located on a valid row. 07009 is thrown if the columnIndex is invalid. 08S01 is thrown on a network receive error. 2200G is thrown if the column type wasn't castable to a string, see {link #ResultSetTypeCasting} for an overview of which column types are castable to which Java types.getClob(int)
public InputStream getAsciiStream(String columnName)
throws SQLException
getAsciiStream in interface ResultSetcolumnName - The column name.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the cursor is not open. 24000 is thrown if the cursor is not located on a valid row. 07009 is thrown if the columnName does not exist. 08S01 is thrown on a network receive error. 2200G is thrown if the column type wasn't castable to a string, see ResultSet for an overview of which column types are castable to which Java types.
public BigDecimal getBigDecimal(int columnIndex)
throws SQLException
getBigDecimal in interface ResultSetcolumnIndex - The column number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the cursor is not open. 24000 is thrown if the cursor is not located on a valid row. 07009 is thrown if the columnIndex is invalid. 22018 is thrown if a character value could not be casted to a numeric value. 2200G is thrown if the column type wasn't castable to a string, see ResultSet for an overview of which column types are castable to which Java types.
public BigDecimal getBigDecimal(int columnIndex,
int scale)
throws SQLException