Nonstop Database, HiRDB Version 9 UAP Development Guide

[Contents][Index][Back][Next]

18.4.6 ResultSet interface

Organization of this subsection
(1) Overview
(2) Methods
(3) Package and class names
(4) Fields
(5) Notes

(1) Overview

The ResultSet interface provides the following principal functions:

(2) Methods

The table below lists the methods of the ResultSet interface. The interface does not support methods that are not listed in the table. If an unsupported method is specified, the interface throws an SQLException.

Table 18-27 ResultSet interface methods

Subsection Method Function
(a) absolute(int row) Moves the cursor to a specified row in this ResultSet object.
(b) afterLast() Moves the cursor to the location immediately following the last row in this ResultSet object.
(c) beforeFirst() Moves the cursor to the location immediately preceding the first row in this ResultSet object.
(d) clearWarnings() Clears all warnings reported about this ResultSet object.
(e) close() Closes the database cursor that has been opened for this ResultSet object and releases JDBC resources.
(f) findColumn(String columnName) Maps a specified column name to its column number.
(g) first() Moves the cursor to the first row in this ResultSet object.
(h) getArray(int i) Acquires as an Array object the elements of the repetition column with a specified column number located in the current row of this ResultSet object.
(i) getArray(String colName) Acquires as an Array object the elements of the repetition column with a specified column name located in the current row of the ResultSet object.
(j) getAsciiStream(int columnIndex) Acquires as a PrdbDataStream object the value of a specified column in the current row of this ResultSet object.
(k) getAsciiStream(String columnName) Acquires as a PrdbDataStream object the value of a specified column in the current row of this ResultSet object.
(l) getBigDecimal(int columnIndex) Acquires as a java.math.BigDecimal object the value of a specified column in the current row of this ResultSet object.
(m) getBigDecimal(int columnIndex, int scale) Acquires the value of a specified column in the current row of this ResultSet object as a java.math.BigDecimal object with the number of decimal places specified in scale.
(n) getBigDecimal(String columnName) Acquires as a java.math.BigDecimal object the value of a specified column in the current row of this ResultSet object.
(o) getBigDecimal(String columnName, int scale) Acquires the value of a specified column in the current row of this ResultSet object as a java.math.BigDecimal object with the number of decimal places specified in scale.
(p) getBinaryStream(int columnIndex) Acquires as a binary stream the value of the column with a specified column number located in the current row of this ResultSet object.
(q) getBinaryStream(String columnName) Acquires as a binary stream the value of a specified column in the current row of this ResultSet object.
(r) getBlob(int i) Acquires as a java.sql.Blob object the value of the column with a specified column number located in the current row of this ResultSet object.
(s) getBlob(String colName) Acquires as a java.sql.Blob object the value of a specified column in the current row of this ResultSet object
(t) getBoolean(int columnIndex) Acquires the value of a specified column in the current row of this ResultSet object as boolean in Java programming language.
(u) getBoolean(String columnName) Acquires the value of a specified column in the current row of this ResultSet object as boolean in Java programming language.
(v) getByte(int columnIndex) Acquires the value of a specified column in the current row of this ResultSet object as byte in Java programming language.
(w) getByte(String columnName) Acquires the value of a specified column in the current row of this ResultSet object as byte in Java programming language.
(x) getBytes(int columnIndex) Acquires the value of a specified column in the current row of this ResultSet object as a byte array in Java programming language.
(y) getBytes(String columnName) Acquires the value of a specified column in the current row of this ResultSet object as a byte array in Java programming language.
(z) getCharacterStream(int columnIndex) Acquires as a java.io.Reader object the value of a specified column in the current row of this ResultSet object.
(aa) getCharacterStream(String columnName) Acquires as a java.io.Reader object the value of a specified column in the current row of this ResultSet object.
(ab) getConcurrency() Returns the parallel processing mode of this ResultSet object.
(ac) getCursorName() Acquires the name of the SQL cursor used by this ResultSet object.
(ad) getDate(int columnIndex) Acquires as a java.sql.Date object the value of a specified column in the current row of this ResultSet object.
(ae) getDate(int columnIndex,Calendar cal) Acquires as a java.sql.Date object the value of a specified column in the current row of this ResultSet object.
(af) getDate(String columnName) Acquires as a java.sql.Date object the value of a specified column in the current row of this ResultSet object.
(ag) getDate(String columnName,Calendar cal) Acquires as a java.sql.Date object the value of a specified column in the current row of this ResultSet object.
(ah) getDouble(int columnIndex) Acquires the value of a specified column in the current row of this ResultSet object as double in Java programming language.
(ai) getDouble(String columnName) Acquires the value of a specified column in the current row of this ResultSet object as double in Java programming language.
(aj) getFetchDirection() Acquires the fetch direction of this ResultSet object.
(ak) getFetchSize() Acquires the fetch size of this ResultSet object.
(al) getFloat(int columnIndex) Acquires the value of a specified column in the current row of this ResultSet object as float in Java programming language.
(am) getFloat(String columnName) Acquires the value of a specified column in the current row of this ResultSet object as float in Java programming language.
(an) getInt(int columnIndex) Acquires the value of a specified column in the current row of this ResultSet object as int in Java programming language.
(ao) getInt(String columnName) Acquires the value of a specified column in the current row of this ResultSet object as int in Java programming language.
(ap) getLong(int columnIndex) Acquires the value of a specified column in the current row of this ResultSet object as long in Java programming language.
(aq) getLong(String columnName) Acquires the value of a specified column in the current row of this ResultSet object as long in Java programming language.
(ar) getMetaData() Returns ResultSetMetaData that represents this ResultSet object's meta information.
(as) getObject(int columnIndex) Acquires the value of a specified column in the current row of this ResultSet object as Object in Java programming language.
(at) getObject(String columnName) Acquires the value of a specified column in the current row of this ResultSet object as Object in Java programming language.
(au) getRow() Acquires the current row number.
(av) getShort(int columnIndex) Acquires the value of a specified column in the current row of this ResultSet object as short in Java programming language.
(aw) getShort(String columnName) Acquires the value of a specified column in the current row of this ResultSet object as short in Java programming language.
(ax) getStatement() Acquires the Statement object that created this ResultSet object.
(ay) getString(int columnIndex) Acquires the value of a specified column in the current row of this ResultSet object as String in Java programming language.
(az) getString(String columnName) Acquires the value of a specified column in the current row of this ResultSet object as String in Java programming language.
(ba) getTime(int columnIndex) Acquires as java.sql.Time the value of a specified column in the current row of this ResultSet object.
(bb) getTime(int columnIndex,Calendar cal) Acquires as a java.sql.Time object the value of a specified column in the current row of this ResultSet object.
(bc) getTime(String columnName) Acquires as a java.sql.Time object the value of a specified column in the current row of this ResultSet object.
(bd) getTime(String columnName,Calendar cal) Acquires as a java.sql.Time object the value of a specified column in the current row of this ResultSet object.
(be) getTimestamp(int columnIndex) Acquires as a java.sql.Timestamp object the value of a specified column in the current row of this ResultSet object.
(bf) getTimestamp(int columnIndex, Calendar cal) Acquires as a java.sql.Timestamp object the value of a specified column in the current row of this ResultSet object.
(bg) getTimestamp(String columnName) Acquires as a java.sql.Timestamp object the value of a specified column in the current row of this ResultSet object.
(bh) getTimestamp(String columnName, Calendar cal) Acquires as a java.sql.Timestamp object the value of a specified column in the current row of this ResultSet object.
(bi) getType() Returns the type of this ResultSet object.
(bj) getWarnings() Acquires the first warning reported by a call related to this ResultSet object.
(bk) isAfterLast() Acquires a value indicating whether the cursor is located after the last row in this ResultSet object.
(bl) isBeforeFirst() Acquires a value indicating whether the cursor is located before the first row in this ResultSet object.
(bm) isFirst() Acquires a value indicating whether the cursor is located on the first row in this ResultSet object.
(bn) isLast() Acquires a value indicating whether the cursor is located on the last row in this ResultSet object.
(bo) last() Moves the cursor to the last row of this ResultSet object.
(bp) next() Moves the cursor from the current position to the next row.
(bq) previous() Moves the cursor to the immediately preceding row in this ResultSet object.
(br) relative(int rows) Moves the cursor by the specified number of rows in the forward or reverse direction relative to the current position.
(bs) setFetchDirection(int direction) Sets the default fetch direction for the result set that is created from this Statement object.
(bt) setFetchSize(int rows) Sets the fetch size of this ResultSet object.
(bu) wasNull() Reports whether the last column value acquired is the NULL value.
(a) absolute(int row)

Function
Moves the cursor to a specified row in this ResultSet object.

Format
 
public synchronized boolean absolute(int row) throws SQLException
 

Arguments
int row
Row number to which the cursor is to be moved. A positive number indicates that the rows in the result set are to be counted from the beginning, and a negative number indicates that the rows are to be counted from the end.

Return value
If the cursor position resulting from this method call is before the first row or after the last row, the method returns false; otherwise, the method returns true.

Functional detail
This method moves the cursor to a specified row in this ResultSet object.
The following table shows the cursor position after this method call and the return value.

Table 18-28 Destination of absolute and the return value

Number of rows in result set# Specified row value Destination Return value
0 Non-zero value Remains before the first row false
n n < row After the last row false
1 [Figure] row [Figure] n row true
-n [Figure] row [Figure] -1 (n + 1) + row true
row < -n Before the first row false

#
If the actual number of rows is greater than the setMaxRows value, the setMaxRows value takes effect.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • The type of this ResultSet object is TYPE_FORWARD_ONLY.
  • row=0 was specified.
  • ResultSet has become invalid due to transaction settlement.
  • A database access error occurred.
(b) afterLast()

Function
Moves the cursor to the location immediately following the last row in this ResultSet object.

Format
 
public synchronized void afterLast() throws SQLException
 

Arguments
None.

Return value
None.

Functional detail
This method moves the cursor to the location immediately following the last row in this ResultSet object.
The following table shows the location to which the cursor is moved when this method is called.

Table 18-29 Destination of afterLast

Number of rows in result set# Current row Row after afterLast() is called
0 Before the first row Remains before the first row
n Before the first row After the last row
1 [Figure] current row [Figure] n After the last row
After the last row Remains after the last row

#
If the actual number of rows is greater than the setMaxRows value, the setMaxRows value takes effect.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • The type of this ResultSet object is TYPE_FORWARD_ONLY.
  • ResultSet has become invalid due to transaction settlement.
  • A database access error occurred.
(c) beforeFirst()

Function
Moves the cursor to the location immediately preceding the first row in this ResultSet object.

Format
 
public synchronized void beforeFirst() throws SQLException
 

Arguments
None.

Return value
None.

Functional detail
This method moves the cursor to the location immediately preceding the first row in this ResultSet object.
The following table shows the location to which the cursor is moved when this method is called.

Table 18-30 Destination of beforeFirst

Number of rows in result set# Current row Row after beforeFirst() is called
0 Before the first row Remains before the first row
n Before the first row Remains before the first row
1 [Figure] current row [Figure] n Before the first row
After the last row Before the first row

#
If the actual number of rows is greater than the setMaxRows value, the setMaxRows value takes effect.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • The type of this ResultSet object is TYPE_FORWARD_ONLY.
  • ResultSet has become invalid due to transaction settlement.
  • A database access error occurred.
(d) clearWarnings()

Function
Clears all warnings reported about this ResultSet object.

Format
 
public synchronized void clearWarnings() throws SQLException
 

Arguments
None.

Return value
None.

Exceptions
If ResultSet has become invalid due to transaction settlement, the JDBC driver throws an SQLException.
(e) close()

Function
Closes the database cursor that has been opened for this ResultSet object and releases JDBC resources.

Format
 
public synchronized void close() throws SQLException
 

Arguments
None.

Return value
None.

Exceptions
If a database access error occurs, the JDBC driver throws an SQLException.
(f) findColumn(String columnName)

Function
Maps a specified column name to its column number.

Format
 
public synchronized int findColumn(String columnName) throws SQLException
 

Arguments
String columnName
Column name (not case sensitive). Because the entire character string in columnName is assumed to be the column name, any double-quotation mark (") contained in the character string is treated as part of the column name. If the specified columnName value is null or a character string with a length of 0, a nonexistent column error occurs.
If multiple columns have the same columnName value, the column with the smallest column number takes precedence. If the column name is truncated based on the HiRDB server specifications because it is too long, but the truncated column name is specified, the method treats the column name as matching the value.

Return value
Column number corresponding to the specified column name

Functional detail
This method acquires and returns the column number that corresponds to the column name specified in the columnName argument.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • The specified column does not exist.
  • A database access error occurred.
(g) first()

Function
Moves the cursor to the first row in this ResultSet object.

Format
 
public synchronized boolean first() throws SQLException
 

Arguments
None.

Return value
If the number of rows in the result set is 0, the method returns false; otherwise, the method returns true.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • The type of this ResultSet object is TYPE_FORWARD_ONLY.
  • ResultSet has become invalid due to transaction settlement.
  • A database access error occurred.
(h) getArray(int i)

Function
Acquires as an Array object the elements of the repetition column with a specified column number located in the current row of this ResultSet object.

Format
 
public Array getArray(int i) throws SQLException
 

Arguments
int i
Column number

Return value
This method returns an Array object corresponding to the specified column. If all elements in the repetition column are the null value, the method returns null.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where the ResultSet object is closed by this driver because the Statement object that created this ResultSet object was closed.
  • The Connection object used to create the Statement object that created this ResultSet object is closed.
  • The ResultSet object has become invalid due to transaction settlement.
  • A nonexistent column number is specified in the i argument.
  • The column indicated by the column number specified in the i argument is not a repetition column.
  • An error occurred in the JDBC driver.
(i) getArray(String colName)

Function
Acquires as an Array object the elements of the repetition column with a specified column name located in the current row of the ResultSet object.

Format
 
public Array getArray(String colName) throws SQLException
 

Arguments
String colName
Column name

Return value
Array object that corresponds to the specified column name (if all elements in the repetition column are the null value, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection object used to create the Statement object that created this ResultSet object is closed.
  • The ResultSet object has become invalid due to transaction settlement.
  • The column specified in the colName argument does not exist or is null.
  • An internal JDBC driver error occurred.
(j) getAsciiStream(int columnIndex)

Function
Acquires as a PrdbDataStream object the value of a specified column in the current row of this ResultSet object.

Format
 
public synchronized InputStream getAsciiStream (int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
PrdbDataStream object with the column value set (if the value is NULL, the method returns null)

Functional detail
This method acquires as a PrdbDataStream object the value of a specified column in the current row of this ResultSet object. The method does not convert the value to ASCII characters.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
[M|N][VAR]CHARBINARYBLOB NULL null
Other than the above InputStream object containing the retrieval result
Other -- SQLException is thrown

Legend:
-- Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • An error occurred in the JDBC driver.
(k) getAsciiStream(String columnName)

Function
Acquires as a PrdbDataStream object the value of a specified column in the current row of this ResultSet object. The method does not convert the value to ASCII characters.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (j) getAsciiStream(int columnIndex).

Format
 
public synchronized InputStream getAsciiStream (String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value
PrdbDataStream object with the column value set (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • An error occurred in the JDBC driver.
(l) getBigDecimal(int columnIndex)

Function
Acquires as a java.math.BigDecimal object the value of a specified column in the current row of this ResultSet object.

Format
 
public synchronized BigDecimal getBigDecimal (int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
Column value that corresponds to the specified column number (if the value is NULL, the method returns null)

Functional detail
This method acquires as a java.math.BigDecimal object the value of a specified column in the current row of this ResultSet object.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
[M|N][VAR]CHAR NULL null
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space] BigDecimal object containing the retrieval results.
The value without the single-byte spaces at the beginning and end of the character string is used as the BigDecimal object.
Other than the above SQLException is thrown
SMALLINT NULL null
Other than the above BigDecimal object containing the retrieval results
INTEGER NULL null
Other than the above BigDecimal object containing the retrieval results
REAL NULL null
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Other than the above BigDecimal object containing the retrieval results
FLOAT NULL null
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Other than the above BigDecimal object containing the retrieval results
DECIMAL NULL null
Other than the above BigDecimal object containing the retrieval results
BOOLEAN# NULL null
true BigDecimal object obtained based on BigDecimal(1)
false BigDecimal object obtained based on BigDecimal(0)
Other -- SQLException is thrown

Legend:

--: Not applicable

#: There is BOOLEAN-type data when the Resultset was created from DatabaseMetadata.


Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as BigDecimal.
  • An error occurred in the JDBC driver.
(m) getBigDecimal(int columnIndex,int scale)

Function
Acquires the value of a specified column in the current row of this ResultSet object as a java.math.BigDecimal object with the number of decimal places specified in scale.

Format
 
public synchronized BigDecimal getBigDecimal(int columnIndex,int scale) throws SQLException
 

Arguments
int columnIndex
Column number
int scale
Scaling

Return value
Column value corresponding to the specified column number with the number of decimal places specified in the scale argument (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified column in the current row of this ResultSet object as a java.math.BigDecimal object with the number of decimal places specified in scale.
If the number of decimal places in the column value is greater than the scale argument value, the method truncates the value based on the scale value. If the number of decimal places in the column value is less than the scale argument value, the method pads the value with 0s.
If the scale argument value is smaller than the number of decimal places in the retrieval result, the method discards the excess decimal places from the retrieval result. If the scale argument value is greater than the number of decimal places in the retrieval result, the method pads the retrieval result with 0s so that the number of decimal places matches the scale value.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (l) getBigDecimal(int columnIndex).

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as BigDecimal.
  • A value less than 0 was specified for scale.
  • An error occurred in the JDBC driver.
(n) getBigDecimal(String columnName)

Function
Acquires as a java.math.BigDecimal object the value of a specified column in the current row of this ResultSet object.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (l) getBigDecimal(int columnIndex).

Format
 
public synchronized BigDecimal getBigDecimal (String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value
Column value corresponding to the specified column name (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as BigDecimal.
  • An error occurred in the JDBC driver.
(o) getBigDecimal(String columnName,int scale)

Function
Acquires the value of a specified column in the current row of this ResultSet object as a java.math.BigDecimal object with the number of decimal places specified in scale.

Format
 
public synchronized BigDecimal getBigDecimal(String columnName,int scale) throws SQLException
 

Arguments
String columnName
Column name
int scale
Scaling

Return value
Column value corresponding to the specified column name with the number of decimal places specified in the scale argument (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified column in the current row of this ResultSet object as a java.math.BigDecimal object with the number of decimal places specified in scale.
If the scale argument value is smaller than the number of decimal places in the retrieval result, the method discards the excess decimal places from the retrieval result. If the scale argument value is greater than the number of decimal places in the retrieval result, the method pads the retrieval result with 0s so that the number of decimal places matches the scale value.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (l) getBigDecimal(int columnIndex).

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as BigDecimal.
  • A value less than 0 was specified for scale.
  • An error occurred in the JDBC driver.
(p) getBinaryStream(int columnIndex)

Function
Acquires as a binary stream the value of the column with a specified column number located in the current row of this ResultSet object.

Format
 
public synchronized InputStream getBinaryStream(int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
Java input stream in which the column value is sent as an uninterpreted byte stream (if the value is NULL, the method returns null)

Functional detail
This method acquires as a binary stream the value of the column with a specified column number located in the current row of this ResultSet object.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
BINARYBLOB NULL null
Other than the above InputStream object containing the retrieval result
Other -- SQLException is thrown

Legend:
-- Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • An error occurred in the JDBC driver.
(q) getBinaryStream(String columnName)

Function
Acquires as a binary stream the value of a specified column in the current row of this ResultSet object.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (p) getBinaryStream(int columnIndex).

Format
 
public synchronized InputStream getBinaryStream (String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value
Java input stream in which the column value is sent as an uninterpreted byte stream (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • An error occurred in the JDBC driver.
(r) getBlob(int i)

Function
Acquires as a java.sql.Blob object the value of the column with a specified column number located in the current row of this ResultSet object.

Format
 
public synchronized Blob getBlob(int i) throws SQLException
 

Arguments
int i
Column number

Return value
Blob object representing the value of the specified column (if the value is NULL, the method returns null)

Functional detail
This method acquires as a java.sql.Blob object the value of the column with a specified column number located in the current row of this ResultSet object.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
BINARYBLOB NULL null
Other than the above java.sql.Blob object containing the retrieval results
Other -- SQLException is thrown

Legend:
-- Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • An error occurred in the JDBC driver.
(s) getBlob(String colName)

Function
Acquires as a java.sql.Blob object the value of a specified column in the current row of this ResultSet object.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (r) getBlob(int i).

Format
 
public synchronized Blob getBlob(String colName) throws SQLException
 

Arguments
String colName
Column name

Return value
Blob object representing the value of the specified column (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • An error occurred in the JDBC driver.
(t) getBoolean(int columnIndex)

Function
Acquires the value of a specified column in the current row of this ResultSet object as boolean in Java programming language.

Format
 
public synchronized boolean getBoolean(int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
true or false (if the value is NULL, the method returns false)

Functional detail
This method acquires the value of a specified column in the current row of this ResultSet object as boolean in Java programming language.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
[M][VAR]CHARNVARCHAR NULL false
[single-byte-space]true (single-byte characters; not case-sensitive)[single-byte-space] true
[single-byte-space]1 (single-byte character)[single-byte-space] true
Other than the above false
NCHAR NULL false
Value beginning with [single-byte-space]true (single-byte characters; not case-sensitive) true
Other than the above false
SMALLINT NULL false
0 false
Non-zero value true
INTEGER NULL false
0 false
Non-zero value true
REAL NULL false
Infinity true
-Infinity true
NaN true
0.0 or -0.0 false
Other than the above true
FLOAT NULL false
Infinity true
-Infinity true
NaN true
0.0 or -0.0 false
Other than the above true
DECIMAL NULL false
0[.00...0] false
Other than the above true
BOOLEAN# NULL false
Non-NULL Retrieval result
Other -- SQLException is thrown

Legend:

--: Not applicable

#: There is BOOLEAN-type data when the Resultset was created from DatabaseMetadata.


Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • An error occurred in the JDBC driver.
(u) getBoolean(String columnName)

Function
Acquires the value of a specified column in the current row of this ResultSet object as boolean in Java programming language.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (t) getBoolean(int columnIndex).

Format
 
public synchronized boolean getBoolean(String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value
true or false (if the value is NULL, the method returns false)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • An error occurred in the JDBC driver.
(v) getByte(int columnIndex)

Function
Acquires the value of a specified column in the current row of this ResultSet object as byte in Java programming language.

Format
 
public synchronized byte getByte(int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
Column value (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified column in the current row of this ResultSet object as byte in Java programming language.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
[M|N][VAR]CHAR NULL 0
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and Byte.MIN_VALUE or greater, and Byte.MAX_VALUE or less Retrieval result converted to a byte value
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and greater than Byte.MAX_VALUE or less than Byte.MIN_VALUE SQLException is thrown
[single-byte-space][+]Infinity[single-byte-space] SQLException is thrown
[single-byte-space]-Infinity[single-byte-space] SQLException is thrown
[single-byte-space][+|-]NaN[single-byte-space] SQLException is thrown
Other than the above (double value cannot be obtained) SQLException is thrown
SMALLINT NULL 0
Byte.MIN_VALUE or greater and Byte.MAX_VALUE or less Retrieval result converted to a byte value
Other than the above SQLException is thrown
INTEGER NULL 0
Byte.MIN_VALUE or greater and Byte.MAX_VALUE or less Retrieval result converted to a byte value
Other than the above SQLException is thrown
REAL NULL 0
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Byte.MIN_VALUE or greater and Byte.MAX_VALUE or less Integer part of the retrieval result converted to a byte value
Other than the above SQLException is thrown
FLOAT NULL 0
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Byte.MIN_VALUE or greater and Byte.MAX_VALUE or less Integer part of the retrieval result converted to a byte value
Other than the above SQLException is thrown
DECIMAL NULL 0
Byte.MIN_VALUE or greater and Byte.MAX_VALUE or less Integer part of the retrieval result converted to a byte value
Other than the above SQLException is thrown
BOOLEAN# NULL 0
true 1
false 0
Other -- SQLException is thrown

Legend:

--: Not applicable

#: There is BOOLEAN-type data when the Resultset was created from DatabaseMetadata.


Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as byte.
  • An error occurred in the JDBC driver.
(w) getByte(String columnName)

Function
Acquires the value of a specified column in the current row of this ResultSet object as byte in Java programming language. For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (v) getByte(int columnIndex).

Format
 
public synchronized byte getByte(String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value

Column value (if the value is NULL, the method returns null)
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as byte.
  • An error occurred in the JDBC driver.
(x) getBytes(int columnIndex)

Function
Acquires the value of a specified column in the current row of this ResultSet as a byte array in Java programming language.

Format
 
public synchronized byte[] getBytes(int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
Column value (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified column in the current row of this ResultSet object as a byte array in Java programming language.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
[M|N][VAR]CHARBINARYBLOB NULL null
Other than the above Retrieval result converted to a byte array
Other -- SQLException is thrown

Legend:
-- Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • An error occurred in the JDBC driver.
(y) getBytes(String columnName)

Function
Acquires the value of a specified column in the current row of this ResultSet object as a byte array in Java programming language. The byte value indicates the row value returned by the driver.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (x) getBytes(int columnIndex).

Format
 
public synchronized byte[] getBytes (String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value
Column value (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • An error occurred in the JDBC driver.
(z) getCharacterStream(int columnIndex)

Function
Acquires as a java.io.Reader object the value of a specified column in the current row of this ResultSet object.

Format
 
public synchronized Reader getCharacterStream (int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
java.io.Reader object containing the column value (if the value is NULL, the method returns null)

Functional detail
This method acquires as a java.io.Reader object the value of a specified column in the current row of this ResultSet object.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
[M|N][VAR]CHARBINARYBLOB NULL null
Other than the above Reader object containing the retrieval result
Other -- SQLException is thrown

Legend:
-- Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • Encoding failed.
  • An error occurred in the JDBC driver.
(aa) getCharacterStream(String columnName)

Function
Acquires as a java.io.Reader object the value of a specified column in the current row of this ResultSet object.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (z) getCharacterStream(int columnIndex).

Format
 
public synchronized Reader getCharacterStream (String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value
Java input stream that sends the column value as a stream of one-byte ASCII characters (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • Encoding failed.
  • An error occurred in the JDBC driver.
(ab) getConcurrency()

Function
Returns the parallel processing mode of this ResultSet object. The method always returns ResultSet.CONCUR_READ_ONLY because the JDBC driver does not support an update cursor.

Format
 
public synchronized int getConcurrency() throws SQLException
 

Arguments
None.

Return value
ResultSet.CONCUR_READ_ONLY
The column value cannot be updated.
ResultSet.CONCUR_UPDATABLE
The column value can be updated.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
(ac) getCursorName()

Function
Acquires the name of the SQL cursor used by this ResultSet object.
In a HiRDB system, the JDBC driver always returns null.

Format
 
public synchronized String getCursorName() throws SQLException
 

Arguments
None.

Return value
null

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
(ad) getDate(int columnIndex)

Function
Acquires as a java.sql.Date object the value of a specified column in the current row of this ResultSet object.

Format
 
public synchronized java.sql.Date getDate(int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
Column value (if the value is NULL, the method returns null)

Functional detail
This method acquires as a java.sql.Date object the value of a specified column in the current row of this ResultSet object.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
[M|N][VAR]CHAR NULL null
[single-byte-space]date-format[single-byte-space] Retrieval result converted to a java.sql.Date object without the single-byte spaces at the beginning and end of the retrieval result
Other than the above SQLException is thrown
DATE NULL null
Other than the above Retrieval result converted to a java.sql.Date object
TIMESTAMP NULL null
Other than the above Retrieval result converted to a java.sql.Date object
Other -- SQLException is thrown

Legend:
-- Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as java.sql.Date.
  • An error occurred in the JDBC driver.
(ae) getDate(int columnIndex, Calendar cal)

Function
Acquires as a java.sql.Date object the value of a specified column in the current row of this ResultSet object. This method uses a specified calendar to create the appropriate date as a millisecond value.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (ad) getDate(int columnIndex).

Format
 
public synchronized java.sql.Date getDate(int columnIndex, Calendar cal) throws SQLException
 

Arguments
int columnIndex
Column number
Calendar cal
Calendar in which the time zone for the values stored in the database has been set

Return value
Column value (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as java.sql.Date.
  • An error occurred in the JDBC driver.
(af) getDate(String columnName)

Function
Acquires as a java.sql.Date object the value of a specified column in the current row of this ResultSet object as a java.sql.Date object.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (ad) getDate(int columnIndex).

Format
 
public synchronized java.sql.Date getDate (String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value
Column value (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as java.sql.Date.
  • An error occurred in the JDBC driver.
(ag) getDate(String columnName, Calendar cal)

Function
Acquires as a java.sql.Date object the value of a specified column in the current row of this ResultSet object. This method uses a specified calendar to create the appropriate date as a millisecond value.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (ad) getDate(int columnIndex).

Format
 
public synchronized java.sql.Date getDate(String columnName, Calendar cal) throws SQLException
 

Arguments
String columnName
Column name
Calendar cal
Calendar in which the time zone for the values stored in the database has been set

Return value
Column value (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as java.sql.Date.
  • An error occurred in the JDBC driver.
(ah) getDouble(int columnIndex)

Function
Acquires the value of a specified column in the current row of this ResultSet object as double in Java programming language.

Format
 
public synchronized double getDouble (int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
Column value (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified column in the current row of this ResultSet object as double in Java programming language.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
[M|N][VAR]CHAR NULL 0.0
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and -Double.MAX_VALUE or greater, and -Double.MAX_VALUE or greater, and Double.MIN_VALUE or less, and Double.MIN_VALUE or greater, and Double.MAX_VALUE or less Retrieval result converted to a double value
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and greater than Double.MAX_VALUE Infinity
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and less than -Double.MAX_VALUE -Infinity
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and less than Double.MIN_VALUE, and greater than 0 0.0
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and greater than -Double.MIN_VALUE, and less than 0 -0.0
[single-byte-space]-Infinity[single-byte-space] -Infinity
[single-byte-space][+]Infinity[single-byte-space] Infinity
[single-byte-space][+|-]NaN[single-byte-space] NaN
Other than the above (double value cannot be obtained) SQLException is thrown
SMALLINT NULL 0.0
Other than the above Retrieval result converted to a double value
INTEGER NULL 0
Other than the above Retrieval result converted to a double value
REAL NULL 0.0
Infinity Infinity
-Infinity -Infinity
NaN NaN
Other than the above Retrieval result converted to a double value
FLOAT NULL 0.0
Infinity Infinity
-Infinity -Infinity
NaN NaN
Other than the above Retrieval result converted to a double value
DECIMAL NULL 0
Other than the above Retrieval result converted to a double value
BOOLEAN# NULL 0.0
true 1.0
false 0.0
Other -- SQLException is thrown

Legend:

--: Not applicable

#: There is BOOLEAN-type data when the Resultset was created from DatabaseMetadata.


Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as double.
  • An error occurred in the JDBC driver.
(ai) getDouble(String columnName)

Function
Acquires the value of a specified column in the current row of this ResultSet object as double in Java programming language.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (ah) getDouble(int columnIndex).

Format
 
public synchronized double getDouble (String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value
Column value (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as double.
  • An error occurred in the JDBC driver.
(aj) getFetchDirection()

Function
Acquires the fetch direction of this ResultSet object. In HiRDB, this method always returns ResultSet.FETCH_FORWARD.

Format
 
public synchronized int getFetchDirection() throws SQLException
 

Arguments
None.

Return value
ResultSet.FETCH_FORWARD
The result set is processed in the forward direction.
ResultSet.FETCH_REVERSE
The result set is processed in the reverse direction.
ResultSet.FETCH_UNKNOWN
The direction in which the result set is processed is unknown.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
(ak) getFetchSize()

Function
Acquires the fetch size of this ResultSet object.
The method returns the value set by setFetchSize.
If no value has been set by setFetchSize, the method returns 0.

Format
 
public synchronized int getFetchSize() throws SQLException
 

Arguments
None.

Return value
Current fetch size for this ResultSet object

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
(al) getFloat(int columnIndex)

Function
Acquires the value of a specified column in the current row of this ResultSet object as float in Java programming language.

Format
 
public synchronized float getFloat (int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
Column value (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified column in the current row of this ResultSet object as float in Java programming language.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
[M|N][VAR]CHAR NULL 0.0
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and one of the following:
  • -Float.MAX_VALUE or greater and -Float.MIN_VALUE or less
  • Float.MIN_VALUE or greater and Float.MAX_VALUE or less
Retrieval result converted to a float value
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and greater than Float.MAX_VALUE Infinity
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and less than -Float.MAX_VALUE -Infinity
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and less than Float.MIN_VALUE, and greater than 0 0.0
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and greater than -Float.MIN_VALUE, and less than 0 -0.0
[single-byte-space]-Infinity[single-byte-space] -Infinity
[single-byte-space][+]Infinity[single-byte-space] Infinity
[single-byte-space][+|-]NaN[single-byte-space] NaN
Other than the above (cannot be converted to a float value) SQLException is thrown
SMALLINT NULL 0.0
Other than the above Retrieval result converted to a float value
INTEGER NULL 0.0
Other than the above Retrieval result converted to a float value
REAL NULL 0.0
Infinity Infinity
-Infinity -Infinity
NaN NaN
Other than the above Retrieval result
FLOAT NULL 0.0
Infinity Infinity
-Infinity -Infinity
NaN NaN
-Float.MAX_VALUE or greater and -Float.MIN_VALUE or less, or Float.MIN_VALUE or greater and Float.MAX_VALUE or less Retrieval result converted to a float value
Greater than Float.MAX_VALUE Infinity
Less than -Float.MAX_VALUE -Infinity
Less than Float.MIN_VALUE and greater than 0 0.0
Greater than -Float.MIN_VALUE and less than 0 -0.0
DECIMAL NULL 0.0
Other than the above Retrieval result converted to a float value
BOOLEAN# NULL 0.0
true 1.0
false 0.0
Other -- SQLException is thrown

Legend:

--: Not applicable

#: There is BOOLEAN-type data when the Resultset was created from DatabaseMetadata.


Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as float.
  • An error occurred in the JDBC driver.
(am) getFloat(String columnName)

Function
Acquires the value of a specified column in the current row of this ResultSet object as float in Java programming language.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (al) getFloat(int columnIndex).

Format
 
public synchronized float getFloat (String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value
Column value (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as float.
  • An error occurred in the JDBC driver.
(an) getInt(int columnIndex)

Function
Acquires the value of a specified column in the current row of this ResultSet object as int in Java programming language.

Format
 
public synchronized int getInt(int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
Column value (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified column in the current row of this ResultSet object as int in Java programming language.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
[M|N][VAR]CHAR NULL 0
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and Integer.MIN_VALUE or greater, and Integer.MAX_VALUE or less Integer part of the retrieval result converted to an int value
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and greater than Integer.MAX_VALUE or less than Integer.MIN_VALUE SQLException is thrown
[single-byte-space]-Infinity[single-byte-space] SQLException is thrown
[single-byte-space][+]Infinity[single-byte-space] SQLException is thrown
[single-byte-space][+|-]NaN[single-byte-space] SQLException is thrown
Other than the above (double value cannot be obtained) SQLException is thrown
SMALLINT NULL 0
Other than the above Retrieval result converted to an int value
INTEGER NULL 0
Other than the above Retrieval result converted to an int value
REAL NULL 0
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Integer.MIN_VALUE or greater and Integer.MAX_VALUE or less Integer part of the retrieval result converted to an int value
Other than the above SQLException is thrown
FLOAT NULL 0
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Integer.MIN_VALUE or greater and Integer.MAX_VALUE or less Integer part of the retrieval result converted to an int value
Other than the above SQLException is thrown
DECIMAL NULL 0
Integer.MIN_VALUE or greater and Integer.MAX_VALUE or less Integer part of the retrieval result converted to an int value
Other than the above SQLException is thrown
BOOLEAN# NULL 0
true 1
false 0
Other -- SQLException is thrown

Legend:

--: Not applicable

#: There is BOOLEAN-type data when the Resultset was created from DatabaseMetadata.


Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as int.
  • An error occurred in the JDBC driver.
(ao) getInt(String columnName)

Function
Acquires the value of a specified column in the current row of this ResultSet object as int in Java programming language.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (an) getInt(int columnIndex).

Format
 
public synchronized int getInt(String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value
Column value (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as int.
  • An error occurred in the JDBC driver.
(ap) getLong(int columnIndex)

Function
Acquires the value of a specified column in the current row of this ResultSet object as long in Java programming language.

Format
 
public synchronized double getLong (int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
Column value (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified column in the current row of this ResultSet object as long in Java programming language.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
[M|N][VAR]CHAR NULL 0
[single-byte-space]integer-in-character-string-representation[single-byte-space] and 15 characters or less, or [single-byte-space]decimal-number-in-character-string-representation[single-byte-space] and 15 characters or less Integer part of the retrieval result converted to a long value
[single-byte-space]integer-in-character-string-representation[single-byte-space] and 16 characters or more, or [single-byte-space]decimal-number-in-character-string-representation[single-byte-space] and 16 characters or more, or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and Long.MIN_VALUE or greater, and Long.MAX_VALUE or less Integer part of the retrieval result converted to a long value
[single-byte-space]integer-in-character-string-representation[single-byte-space] and 16 characters or more, or [single-byte-space]decimal-number-in-character-string-representation[single-byte-space] and 16 characters or more, or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], greater than Long.MAX_VALUE or less than Long.MIN_VALUE SQLException is thrown
[single-byte-space]-Infinity[single-byte-space] SQLException is thrown
[single-byte-space][+]Infinity[single-byte-space] SQLException is thrown
[single-byte-space][+|-]NaN[single-byte-space] SQLException is thrown
Other than the above (cannot be converted to a double value or BigDecimal object) SQLException is thrown
SMALLINT NULL 0
Other than the above Retrieval result converted to a long value
INTEGER NULL 0
Other than the above Retrieval result converted to a long value
REAL NULL 0
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Long.MIN_VALUE or greater and Long.MAX_VALUE or less Integer part of the retrieval result converted to a long value
Other than the above SQLException is thrown
FLOAT NULL 0
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Long.MIN_VALUE or greater and Long.MAX_VALUE or less Integer part of the retrieval result converted to a long value
Other than the above SQLException is thrown
DECIMAL NULL 0
Long.MIN_VALUE and greater and Long.MAX_VALUE and less Integer part of the retrieval result converted to a long value
BINARYBLOB NULL 0
Data with a length of 0 0
1 byte or more Maximum of 8 bytes converted to a long value in little endian format
BOOLEAN# NULL 0
true 1
false 0
Other -- SQLException is thrown

Legend:

--: Not applicable

#: There is BOOLEAN-type data when the Resultset was created from DatabaseMetadata.


Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as long.
  • An error occurred in the JDBC driver.
(aq) getLong(String columnName)

Function
Acquires the value of a specified column in the current row of this ResultSet object as long in Java programming language.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (ap) getLong(int columnIndex).

Format
 
public synchronized double getLong (String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value
Column value (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as long.
  • An error occurred in the JDBC driver.
(ar) getMetaData()

Function
Returns ResultSetMetaData that represents this ResultSet object's meta information.

Format
 
public synchronized ResultSetMetaData getMetaData() throws SQLException
 

Arguments
None.

Return value
This method returns meta information for this ResultSet object as a ResultSetMetaData object.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
(as) getObject(int columnIndex)

Function
Acquires the value of a specified column in the current row of this ResultSet object as Object in Java programming language.

Format
 
public synchronized Object getObject (int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
This method returns a column value as a Java object.
This Java object has the default Java object type that corresponds to the column's SQL type based on the mapping of built-in types specified in the JDBC specifications. If the value is NULL, the method returns null.

Functional detail
This method acquires the value of a specified column in the current row of this ResultSet object as Object in Java programming language.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
[M|N][VAR]CHAR NULL null
Other than the above Retrieval result
SMALLINT NULL null
Other than the above Integer object created by using the retrieval result
INTEGER NULL null
Other than the above Integer object created by using the retrieval result
REAL NULL null
Other than the above Float object created by using the retrieval result
FLOAT NULL null
Other than the above Double object created by using the retrieval result
DECIMAL NULL null
Other than the above Retrieval result
DATE NULL null
Other than the above java.sql.Date object created by using the retrieval result
TIME NULL null
Other than the above java.sql.Time object created by using the retrieval result
TIMESTAMP NULL null
Other than the above java.sql.Timestamp object created by using the retrieval result
BINARYBLOB NULL null
Other than the above Retrieval result
BOOLEAN# NULL null
Non-NULL Boolean object created by using the retrieval result

#: There is BOOLEAN-type data when the Resultset was created from DatabaseMetadata.


Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • An error occurred in the JDBC driver.
(at) getObject(String columnName)

Function
Acquires the value of a specified column in the current row of this ResultSet object as Object in Java programming language.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (as) getObject(int columnIndex).

Format
 
public synchronized Object getObject (String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value
This method returns a column value as a Java object.
This Java object has the default Java object type that corresponds to the column's SQL type based on the mapping of built-in types specified in the JDBC specifications. If the value is NULL, the method returns null.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • An error occurred in the JDBC driver.
(au) getRow()

Function
Acquires the current row number, such as 1 for the first row, 2 for the second row, etc. If the row is before the first row or after the last row, the row number is 0.
If the number of retrieved rows exceeds 2147483647, the method returns 2147483647.

Format
 
public synchronized int getRow() throws SQLException
 

Arguments
None.

Return value
Current row number (if the current row number is greater than Integer.MAX_VALUE, the method returns Integer.MAX_VALUE)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A database access error occurred.
(av) getShort(int columnIndex)

Function
Acquires the value of a specified column in the current row of this ResultSet object as short in Java programming language.

Format
 
public synchronized short getShort(int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
Column value (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified column in the current row of this ResultSet object as short in Java programming language.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
[M|N][VAR]CHAR NULL 0
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and Short.MIN_VALUE or greater, and Short.MAX_VALUE or less Integer part of the retrieval result converted to a short value
[single-byte-space]integer-in-character-string-representation[single-byte-space], [single-byte-space]decimal-number-in-character-string-representation[single-byte-space], or [single-byte-space]floating-point-number-in-character-string-representation[single-byte-space], and greater than Short.MAX_VALUE or less than Short.MIN_VALUE SQLException is thrown
[single-byte-space]-Infinity[single-byte-space] SQLException is thrown
[single-byte-space][+]Infinity[single-byte-space] SQLException is thrown
[single-byte-space][+|-]NaN[single-byte-space] SQLException is thrown
Other than the above (double value cannot be obtained) SQLException is thrown
SMALLINT NULL 0
Other than the above Retrieval result
INTEGER NULL 0
Short.MIN_VALUE or greater and Short.MAX_VALUE or less Retrieval result converted to a short value
Other than the above SQLException is thrown
REAL NULL 0
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Short.MIN_VALUE or greater and Short.MAX_VALUE or less Integer part of the retrieval result converted to a short value
Other than the above SQLException is thrown
FLOAT NULL 0
Infinity SQLException is thrown
-Infinity SQLException is thrown
NaN SQLException is thrown
Short.MIN_VALUE or greater and Short.MAX_VALUE or less Integer part of the retrieval result converted to a short value
Other than the above SQLException is thrown
DECIMAL NULL 0
Short.MIN_VALUE and greater and Short.MAX_VALUE or less Integer part of the retrieval result converted to a short value
Other than the above SQLException is thrown
BOOLEAN# NULL 0
true 1
false 0
Other -- SQLException is thrown

Legend:

--: Not applicable

#: There is BOOLEAN-type data when the Resultset was created from DatabaseMetadata.


Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as short.
  • An error occurred in the JDBC driver.
(aw) getShort(String columnName)

Function
Acquires the value of a specified column in the current row of this ResultSet object as short in Java programming language.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (av) getShort(int columnIndex).

Format
 
public synchronized short getShort (String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value
Column value (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as short.
  • An error occurred in the JDBC driver.
(ax) getStatement()

Function
Acquires the Statement object that created this ResultSet object.
If the result set was created by a method of DatabaseMetaData, this method returns null.

Format
 
public synchronized Statement getStatement() throws SQLException
 

Arguments
None.

Return value
Statement object that created this ResultSet object (if the result set was created by a method of DatabaseMetaData, this method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
(ay) getString(int columnIndex)

Function
Acquires the value of a specified column in the current row of this ResultSet object as String in Java programming language.

Format
 
public synchronized String getString(int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
Column value (if the value is NULL, the method returns null)

Functional detail
This method acquires the value of a specified column in the current row of this ResultSet object as String in Java programming language.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
[M|N][VAR]CHAR NULL null
Other than the above Retrieval result
SMALLINT NULL null
Other than the above String object containing the retrieval result in character string representation
INTEGER NULL null
Other than the above String object containing the retrieval result in character string representation
REAL NULL null
Infinity String object of the character string "Infinity"
-Infinity String object of the character string "-Infinity"
NaN String object of the character string "NaN"
Other than the above String object containing the retrieval result in character string representation
FLOAT NULL null
Infinity String object of the character string "Infinity"
-Infinity String object of the character string "-Infinity"
NaN String object of the character string "NaN"
Other than the above String object containing the retrieval result in character string representation
DECIMAL NULL null
Other than the above String object containing the retrieval result in character string representation
DATE NULL null
Other than the above String object of a character string in yyyy-MM-DD format acquired by JdbConvert.convertDate()
TIME NULL null
Other than the above String object of a character string in hh:mm:ss format
TIMESTAMP NULL null
Other than the above String object of a character string in yyyy-MM-DD[Figure]hh:mm:ss[.ffffff] format
BINARYBLOB NULL null
Other than the above String object obtained as the retrieval result
BOOLEAN# NULL null
true String object of the character string "true"
false String object of the character string "false"

#: There is BOOLEAN-type data when the Resultset was created from DatabaseMetadata.


Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • Encoding failed.
  • The data type cannot be acquired by this method.
  • An error occurred in the JDBC driver.
(az) getString(String columnName)

Function
Acquires the value of a specified column in the current row of this ResultSet object as String in Java programming language.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (ay) getString(int columnIndex).

Format
 
public synchronized String getString(String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value
Column value (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • Encoding failed.
  • The data type cannot be acquired by this method.
  • An error occurred in the JDBC driver.
(ba) getTime(int columnIndex)

Function
Acquires as java.sql.Time the value of a specified column in the current row of this ResultSet object.

Format
 
public synchronized java.sql.Time getTime(int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
Column value (if the value is NULL, the method returns null)

Functional detail
This method acquires as java.sql.Time the value of a specified column in the current row of this ResultSet object.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
[M|N][VAR]CHAR NULL null
[single-byte-space]time-format[single-byte-space] Value obtained by removing single-byte spaces at the beginning and end of the retrieval result and then converting to a java.sql.Time object
Other than the above SQLException
TIME NULL null
Other than the above Retrieval result converted to a java.sql.Time object
TIMESTAMP NULL null
Other than the above Retrieval result converted to a java.sql.Time object
Other -- SQLException

Legend:
-- Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as java.sql.Time.
  • An error occurred in the JDBC driver.
(bb) getTime(int columnIndex, Calendar cal)

Function
Acquires as a java.sql.Time object the value of a specified column in the current row of this ResultSet object. This method uses a specified calendar to create the appropriate time as a millisecond value.

Format
 
public synchronized java.sql.Time getTime (int columnIndex, Calendar cal) throws SQLException
 

Arguments
int columnIndex
Column number
Calendar cal
Calendar in which the time zone for the values stored in the database has been set

Return value
Column value (if the value is NULL, the method returns null)
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (ba) getTime(int columnIndex).

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as java.sql.Time.
  • An error occurred in the JDBC driver.
(bc) getTime(String columnName)

Function
Acquires as a java.sql.Time object the value of a specified column in the current row of this ResultSet object.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (ba) getTime(int columnIndex).

Format
 
public synchronized java.sql.Time getTime (String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value
Column value (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as java.sql.Time.
  • An error occurred in the JDBC driver.
(bd) getTime(String columnName, Calendar cal)

Function
Acquires as a java.sql.Time object the value of a specified column in the current row of this ResultSet object. This method uses a specified calendar to create the appropriate time as a millisecond value.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (ba) getTime(int columnIndex).

Format
 
public synchronized java.sql.Time getTime (String columnName, Calendar cal) throws SQLException
 

Arguments
String columnName
Column name
Calendar cal
Calendar in which the time zone for the values stored in the database has been set

Return value
Column value (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as java.sql.Time.
  • An error occurred in the JDBC driver.
(be) getTimestamp(int columnIndex)

Function
Acquires as a java.sql.Timestamp object the value of a specified column in the current row of this ResultSet object.

Format
 
public synchronized java.sql.Timestamp getTimestamp (int columnIndex) throws SQLException
 

Arguments
int columnIndex
Column number

Return value
Column value (if the value is NULL, the method returns null)

Functional detail
This method acquires as a java.sql.Timestamp object the value of a specified column in the current row of this ResultSet object.
The following table shows the relationships among the HiRDB data type, the retrieval results, and the return value:
HiRDB data type Retrieval result Return value
[M|N][VAR]CHAR NULL null
[single-byte-space]timestamp-format[single-byte-space] Value obtained by removing single-byte spaces at the beginning and end of the retrieval result and then converting to a java.sql.Timestamp object
Other than the above SQLException is thrown
DATE NULL null
Other than the above Retrieval result converted to a java.sql.Timestamp object
TIMESTAMP NULL null
Other than the above Retrieval result converted to a java.sql.Timestamp object
Other -- SQLException is thrown

Legend:
-- Not applicable

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as java.sql.Timestamp.
  • An error occurred in the JDBC driver.
(bf) getTimestamp(int columnIndex, Calendar cal)

Function
Acquires as a java.sql.Timestamp object the value of a specified column in the current row of this ResultSet object. This method uses a specified calendar to create the appropriate timestamp as a millisecond value.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (be) getTimestamp(int columnIndex).

Format
 
public synchronized java.sql.Timestamp getTimestamp (int columnIndex, Calendar cal) throws SQLException
 

Arguments
int columnIndex
Column number
Calendar cal
Calendar in which the time zone for the values stored in the database has been set

Return value
Column value (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column number is specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as java.sql.Timestamp.
  • An error occurred in the JDBC driver.
(bg) getTimestamp(String columnName)

Function
Acquires as a java.sql.Timestamp object the value of a specified column in the current row of this ResultSet object.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (be) getTimestamp(int columnIndex).

Format
 
public synchronized java.sql.Timestamp getTimestamp (String columnName) throws SQLException
 

Arguments
String columnName
Column name

Return value
Column value (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as java.sql.Timestamp.
  • An error occurred in the JDBC driver.
(bh) getTimestamp(String columnName, Calendar cal)

Function
Acquires as a java.sql.Timestamp object the value of a specified column in the current row of this ResultSet object. This method uses a specified calendar to create the appropriate timestamp as a millisecond value.
For the relationships among the HiRDB data type, the retrieval results, and the return value, see Functional detail in (be) getTimestamp(int columnIndex).

Format
 
public synchronized java.sql.Timestamp getTimestamp (String columnName, Calendar cal) throws SQLException
 

Arguments
String columnName
Column name
Calendar cal
Calendar in which the time zone for the values stored in the database has been set

Return value
Column value (if the value is NULL, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A nonexistent column name was specified.
  • The data type cannot be acquired by this method.
  • The column value cannot be acquired as java.sql.Timestamp.
  • An error occurred in the JDBC driver.
(bi) getType()

Function
Returns the type of this ResultSet object. This method returns ResultSet.TYPE_FORWARD_ONLY or ResultSet.TYPE_SCROLL_INSENSITIVE.

Format
 
public synchronized int getType() throws SQLException
 

Arguments
None.

Return value
ResultSet.TYPE_FORWARD_ONLY
The cursor can move only forward.
ResultSet.TYPE_SCROLL_INSENSITIVE
The cursor can be scrolled, but a value change does not take effect.
ResultSet.TYPE_SCROLL_SENSITIVE
The cursor can be scrolled, and a value change takes effect.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
(bj) getWarnings()

Function
Acquires the first warning reported by a call related to this ResultSet object. If there is more than one warning, the subsequent warnings are chained to the first warning and can be acquired by calling the SQLWarning.getNextWarning method for the immediately preceding warning that was acquired.

Format
 
public synchronized SQLWarning getWarnings() throws SQLException
 

Arguments
None.

Return value
First SQLWarning object (if there is no SQLWarning object, the method returns null)

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
(bk) isAfterLast()

Function
Acquires a value indicating whether the cursor is located after the last row in this ResultSet object.

Format
 
public synchronized boolean isAfterLast() throws SQLException
 

Arguments
None.

Return value
If the cursor is located after the last row, the method returns true; if not, or the result set contains no rows, the method returns false.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A database access error occurred.
(bl) isBeforeFirst()

Function
Acquires a value indicating whether the cursor is located before the first row in this ResultSet object.

Format
 
public synchronized boolean isBeforeFirst() throws SQLException
 

Arguments
None.

Return value
If the cursor is located before the first row, the method returns true; if not, or the result set contains no rows, the method returns false.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A database access error occurred.
(bm) isFirst()

Function
Acquires a value indicating whether the cursor is located on the first row in this ResultSet object.

Format
 
public synchronized boolean isFirst() throws SQLException
 

Arguments
None.

Return value
If the cursor is located on the first row, the method returns true; if not, the method returns false.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A database access error occurred.
(bn) isLast()

Function
Acquires a value indicating whether the cursor is located on the last row in this ResultSet object.

Format
 
public synchronized boolean isLast() throws SQLException
 

Arguments
None.

Return value
If the cursor is located on the last row, the method returns true; if not, the method returns false.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A database access error occurred.
(bo) last()

Function
Moves the cursor to the last row of this ResultSet object.

Format
 
public synchronized boolean last() throws SQLException
 

Arguments
None.

Return value
If the cursor has moved to the last row, the method returns true; if the result set contains no rows, the method returns false.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • The type of this ResultSet object is TYPE_FORWARD_ONLY.
  • ResultSet has become invalid due to transaction settlement.
  • A database access error occurred.
(bp) next()

Function
Moves the cursor from the current position to the next row. If the current cursor position is before the first row, the method moves the cursor to the first row; if it is on the last row, the method moves the cursor to a location after the last row.
The first time the next method is called, the cursor is opened.

Format
 
public synchronized boolean next() throws SQLException
 

Arguments
None.

Return value
If the cursor position resulting from this method call is before the first row or after the last row, the method returns false; otherwise, the method returns true.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.
  • A database access error occurred.
(bq) previous()

Function
Moves the cursor to the immediately preceding row in this ResultSet object.

Format
 
public synchronized boolean previous() throws SQLException
 

Arguments
None.

Return value
If the cursor position resulting from this method call is before the first row, the method returns false; otherwise, the method returns true.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • The type of this ResultSet object is TYPE_FORWARD_ONLY.
  • ResultSet has become invalid due to transaction settlement.
  • A database access error occurred.
(br) relative(int rows)

Function
Moves the cursor by the specified number of rows in the forward or reverse direction relative to the current position.
A positive number means that the cursor is to move in the forward direction, and a negative number that the cursor is to move in the reverse direction.

Format
 
public synchronized boolean relative(int rows) throws SQLException
 

Arguments
int rows
Number of rows to be moved relative to the current row

Return value
If the cursor position resulting from this method call is before the first row or after the last row, the method returns false; otherwise, the method returns true.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • The type of this ResultSet object is TYPE_FORWARD_ONLY.
  • The current position cannot be acquired.
  • The current cursor position is not on a valid row.
  • ResultSet has become invalid due to transaction settlement.
  • A database access error occurred.
(bs) setFetchDirection(int direction)

Function
Sets the default fetch direction for the result set that is created from this Statement object.
Only ResultSet.FETCH_FORWARD can be specified.

Format
 
public synchronized void setFetchDirection(int direction) throws SQLException
 

Arguments
int direction
Default fetch direction

Return value
None.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This Statement object is closed.
  • The Connection used to create this Statement object is closed.
  • A value other than ResultSet.FETCH_FORWARD is specified for direction.
(bt) setFetchSize(int rows)

Function
Sets the fetch size of this ResultSet object. If 0 is specified, the fetch size depends on the client environment definition.

Format
 
public synchronized void setFetchSize(int rows) throws SQLException
 

Arguments
int rows
Number of rows to be fetched, in the range from 0 to 4096.

Return value
None.

Functional detail
This method sets the fetch size of this ResultSet object. When 0 is specified, the fetch size depends on the client environment definition.
If this method is omitted, the JDBC driver uses the number of rows specified in the Statement object for retrieval. If no number of rows is specified in the Statement object, or this ResultSet object has not been created from the Statement object, the JDBC driver uses the value of the PDBLKF client environment definition for retrieval. If 0 is specified in this method, the JDBC driver uses the value of the PDBLKFclient environment definition for retrieval. For other notes, see 18.4.3(2)(z) setFetchSize(int rows).

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • The type of this ResultSet object is TYPE_FORWARD_ONLY.
  • The current position cannot be acquired.
  • The current cursor position is not on a valid row.
  • ResultSet has become invalid due to transaction settlement.
  • A database access error occurred.
(bu) wasNull()

Function
Reports whether the last column value acquired is the NULL value.
This method returns false before any value has been acquired by a getXXX method.

Format
 
public synchronized boolean wasNull() throws SQLException
 

Arguments
None.

Return value
If the last column value acquired is NULL, the method returns true; otherwise, the method returns false.

Exceptions
The JDBC driver throws an SQLException in the following cases:
  • This ResultSet object is closed.
    This includes the case where this driver closed ResultSet because the Statement that created this ResultSet object was closed.
  • The Connection used to create the Statement that created this ResultSet object has been closed.
  • ResultSet has become invalid due to transaction settlement.

(3) Package and class names

The names of the package and class for installing this interface are as follows:

Package name: JP.co.Hitachi.soft.HiRDB.JDBC

Class name: PrdbResultSet

(4) Fields

The following table lists the fields supported by the ResultSet interface.

Table 18-31 Fields supported by the ResultSet interface

Field Remarks
public static final int FETCH_FORWARD --
public static final int FETCH_REVERSE --
public static final int FETCH_UNKNOWN --
public static final int TYPE_FORWARD_ONLY --
public static final int TYPE_SCROLL_INSENSITIVE --
public static final int TYPE_SCROLL_SENSITIVE When this value is specified, the JDBC driver assumes that TYPE_SCROLL_INSENSITIVE was specified.
public static final int CONCUR_READ_ONLY --
public static final int CONCUR_UPDATABLE When this value is specified, the JDBC driver assumes that CONCUR_READ_ONLY was specified.
public static final int HOLD_CURSORS_OVER_COMMIT --
public static final int CLOSE_CURSORS_AT_COMMIT --

Legend:
--: None

(5) Notes

(a) Value acquisition using a getXXX method
(b) Mapping (conversion)

For details about whether mapping is possible with a getXXX method to be used in getting retrieval data, see 18.8.2 Mapping during retrieval data acquisition. If a getXXX method is called for a JDBC SQL type that cannot be mapped, the JDBC driver throws an SQLException.

(c) Using the block transfer facility by specifying the setFetchSize method

For details, see 18.4.3(4)(a) Using the block transfer facility by specifying the setFetchSize method.

(d) Memory size used when the result set type is ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_SCROLL_SENSITIVE

When the result set type is ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_SCROLL_SENSITIVE, the JDBC driver allocates memory for accumulating the retrieval results when the following methods of the ResultSet interface are executed:

The JDBC driver assigns and accumulates memory objects to all values in the retrieval results. If a value has a variable length, the memory object is set to the actual size of the retrieved data.

(e) next, absolute, relative, last, and afterLast methods

When the next method is executed, the JDBC driver retrieves and accumulates data from the database as described in the following table.

Table 18-32 Data retrieved and accumulated from the database during execution of the next method

Condition Result set type
TYPE_FORWARD_ONLY TYPE_SCROLL_INSENSITIVE or TYPE_SCROLL_SENSITIVE
The data of the current row, which was moved by the next method, has not been read into the JDBC driver. The JDBC driver gets the moved current row from the connected database. The JDBC driver gets the moved current row from the connected database, then reads and stores the row in its memory.
The data of the current row, which was moved by the next method, has been read into the JDBC driver. The JDBC driver does not retrieve data from the connected database.

When the absolute, relative, last, or afterLast method is executed, the JDBC driver retrieves and accumulates data from the database as described in the following table.

Table 18-33 Data retrieved and accumulated from the database during execution of the absolute, relative, last, or afterLast method

Condition Result set type is TYPE_SCROLL_INSENSITIVE or TYPE_SCROLL_SENSITIVE
The first row to the specified row# of the retrieval results contain data that the JDBC driver has not read. The JDBC driver retrieves the rows that were not read from the connected database and stores them in its memory.
The first row to the specified row# of the retrieval results do not contain data that the JDBC driver has not read. The JDBC driver does not retrieve data from the connected database.

Note
If the data type of the result set is TYPE_FORWARD_ONLY, the JDBC driver throws an SQLException.

#
If the last or afterLast method is used, the range is from the first row to the last row.
(f) getAsciiStream, getBinaryStream, getCharacterStream, and getUnicodeStream methods

The JDBC driver does not implicitly close objects returned by the getAsciiStream, getBinaryStream, getCharacterStream, and getUnicodeStream methods. You must make provision for the method-calling side to execute the close method.

(g) Number of retrieved rows

The following table shows the number of retrieved rows that ResultSet objects can obtain from the HiRDB server. The JDBC driver discards retrieval results that exceed the applicable number of rows shown in the following table.

Table 18-34 Number of retrieved rows that ResultSet objects can obtain from the HiRDB server

ResultSet object Result set type
TYPE_SCROLL_INSENSITIVE or TYPE_SCROLL_SENSITIVE Other type
ResultSet object generated by Statement object that executed setMaxRows method The number of retrieved rows is the number of rows specified by setMaxRows method.
Other ResultSet object The number of retrieved rows is the upper limit for setMaxRows (2,147,483,647). No upper limit
(h) About the default null value

Tables 18-35 and 18-36 show the return values of a getXXXX method for HiRDB data types when the default null value setting facility is used (by specifying USE in the PDDFLNVAL client environment definition) and the retrieval result is the default null value.

For details about the default null value setting facility, see the manual HiRDB Version 9 SQL Reference.

When the default null value setting facility is used, the wasNull method returns FALSE.

Note that the default null value setting facility is not applicable to a ResultSet object that has been acquired by a method of the DatabaseMetaData class. Therefore, the JDBC driver sets NULL as the getXXXX method's return value even if the default null value setting facility is used.

Table 18-35 Return value of a getXXXX method for HiRDB data types when the retrieval result is the default null value (1/2)

getXXX method HiRDB data type
[M|N][VAR]CHAR BINARY
BLOB
DATE TIME TIMESTAMP
getByte -- -- -- -- --
getShort -- -- -- -- --
getInt -- -- -- -- --
getLong -- -- -- -- --
getFloat -- -- -- -- --
getDouble -- -- -- -- --
getBigDecimal -- -- -- -- --
getBoolean FALSE -- -- -- --
getString Default NULL value String object of the default NULL value String object of a character string in yyyy-MM-DD format obtained by converting the default NULL value String object of a character string in hh:mm:ss format obtained by converting the default NULL value String object of a character string in yyyy-MM-DD[Figure]hh:mm:ss[.ffffff] format obtained by converting the default NULL value
getBytes Default NULL value converted to a byte array Same as left -- -- --
getDate -- -- Default NULL value converted to a java.sql.Date object -- Default NULL value converted to a java.sql.Date object
getTime -- -- -- Default NULL value converted to a java.sql.Time object Same as left
getTimestamp -- -- Default NULL value converted to a java.sql.Timestamp object -- Default NULL value converted to a java.sql.Timestamp object
getAsciiStream InputStream object containing the default NULL value Same as left -- -- --
getBinaryStream -- InputStream object containing the default NULL value -- -- --
getObject Default NULL value Same as left java.sql.Date object created by the default NULL value java.sql.Time object created by the default NULL value java.sql.Timestamp object created by the default NULL value
getCharacterStream Reader object containing the default NULL value Same as left -- -- --
getArray -- -- -- -- --
getBlob -- java.sql.Blob object that has the default NULL value -- -- --

Legend:
-- An SQLException is thrown.

Table 18-36 Return value of a getXXXX method for HiRDB data types when the retrieval result is the default null value (2/2)

getXXX method JDBC SQL type
SMALLINT INTEGER REAL FLOAT DECIMAL ARRAY
getByte Default NULL value converted to a byte value Same as left Same as left Same as left Same as left --
getShort Default NULL value Default NULL value converted to a short value Integer part of the default NULL value converted to a short value Same as left Same as left --
getInt Default NULL value converted to an int value Same as left Integer part of the default NULL value converted to an int value Same as left Same as left --
getLong Default NULL value converted to a long value Same as left Integer part of the default NULL value converted to a long value Same as left Same as left --
getFloat Default NULL value converted to a float value Same as left Same as left Same as left Same as left --
getDouble Default NULL value converted to a double value Same as left Same as left Same as left Same as left --
getBigDecimal BigDecimal object that has the default NULL value Same as left Same as left Same as left Same as left --
getBoolean FALSE Same as left Same as left Same as left Same as left --
getString String object containing the default NULL value in character string representation Same as left Same as left Same as left Same as left --
getBytes -- -- -- -- -- --
getDate -- -- -- -- -- --
getTime -- -- -- -- -- --
getTimestamp -- -- -- -- -- --
getAsciiStream -- -- -- -- -- --
getBinaryStream -- -- -- -- -- --
getObject Integer object created by the default NULL value Same as left Float object created by the default NULL value Double object created by the default NULL value Default NULL value Array object created by the default NULL value
getCharacterStream -- -- -- -- -- --
getArray -- -- -- -- -- java.sql.Array object containing no element
getBlob -- -- -- -- -- --

Legend:
-- An SQLException is thrown.