Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gjt.mm.mysql.ResultSet
Method Summary | |
void | clearWarnings()
After this call, getWarnings returns null until a new warning is reported for this ResultSet |
void | close()
In some cases, it is desirable to immediately release a ResultSet database and JDBC resources instead of waiting for this to happen when it is automatically closed. |
int | findColumn(java.lang.String ColumnName)
Map a ResultSet column name to a ResultSet column index |
java.io.InputStream | getAsciiStream(int columnIndex)
A column value can be retrieved as a stream of ASCII characters and then read in chunks from the stream. |
java.io.InputStream | getAsciiStream(java.lang.String ColumnName)
|
java.math.BigDecimal | getBigDecimal(int columnIndex,
int scale)
Get the value of a column in the current row as a java.lang. |
java.math.BigDecimal | getBigDecimal(java.lang.String ColumnName,
int scale)
|
java.io.InputStream | getBinaryStream(int columnIndex)
A column value can also be retrieved as a binary strea. |
java.io.InputStream | getBinaryStream(java.lang.String ColumnName)
|
boolean | getBoolean(int columnIndex)
Get the value of a column in the current row as a Java boolean |
boolean | getBoolean(java.lang.String ColumnName)
|
byte | getByte(int columnIndex)
Get the value of a column in the current row as a Java byte. |
byte | getByte(java.lang.String ColumnName)
|
byte[] | getBytes(int columnIndex)
Get the value of a column in the current row as a Java byte array. |
byte[] | getBytes(java.lang.String ColumnName)
|
java.lang.String | getCursorName()
Get the name of the SQL cursor used by this ResultSet In SQL, a result table is retrieved though a cursor that is named. |
java.sql.Date | getDate(int columnIndex)
Get the value of a column in the current row as a java.sql. |
java.sql.Date | getDate(java.lang.String ColumnName)
|
double | getDouble(int columnIndex)
Get the value of a column in the current row as a Java double. |
double | getDouble(java.lang.String ColumnName)
|
float | getFloat(int columnIndex)
Get the value of a column in the current row as a Java float. |
float | getFloat(java.lang.String ColumnName)
|
int | getInt(int columnIndex)
Get the value of a column in the current row as a Java int. |
int | getInt(java.lang.String ColumnName)
|
long | getLong(int columnIndex)
Get the value of a column in the current row as a Java long. |
long | getLong(java.lang.String ColumnName)
|
java.sql.ResultSetMetaData | getMetaData()
The numbers, types and properties of a ResultSet's columns are provided by the getMetaData method |
java.lang.Object | getObject(int columnIndex)
Get the value of a column in the current row as a Java object This method will return the value of the given column as a Java object. |
java.lang.Object | getObject(java.lang.String ColumnName)
Get the value of a column in the current row as a Java object This method will return the value of the given column as a Java object. |
short | getShort(int columnIndex)
Get the value of a column in the current row as a Java short. |
short | getShort(java.lang.String ColumnName)
|
java.lang.String | getString(int columnIndex)
Get the value of a column in the current row as a Java String |
java.lang.String | getString(java.lang.String ColumnName)
The following routines simply convert the columnName into a columnIndex and then call the appropriate routine above. |
java.sql.Time | getTime(int columnIndex)
Get the value of a column in the current row as a java.sql. |
java.sql.Time | getTime(java.lang.String ColumnName)
|
java.sql.Timestamp | getTimestamp(int columnIndex)
Get the value of a column in the current row as a java.sql. |
java.sql.Timestamp | getTimestamp(java.lang.String ColumnName)
|
java.io.InputStream | getUnicodeStream(int columnIndex)
A column value can also be retrieved as a stream of Unicode characters. |
java.io.InputStream | getUnicodeStream(java.lang.String ColumnName)
|
java.sql.SQLWarning | getWarnings()
The first warning reported by calls on this ResultSet is returned. |
boolean | next()
A ResultSet is initially positioned before its first row, the first call to next makes the first row the current row; the second call makes the second row the current row, etc. |
boolean | prev()
The prev method is not part of JDBC, but because of the architecture of this driver it is possible to move both forward and backward within the result set. |
boolean | wasNull()
A column may have the value of SQL NULL; wasNull() reports whether the last column read had this special value. |
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Method Detail |
public boolean next() throws java.sql.SQLException
If an input stream from the previous row is open, it is implicitly closed. The ResultSet's warning chain is cleared when a new row is read
public boolean prev() throws java.sql.SQLException
If an input stream from the previous row is open, it is implicitly closed. The ResultSet's warning chain is cleared when a new row is read
public void close() throws java.sql.SQLException
Note: A ResultSet is automatically closed by the Statement the Statement that generated it when that Statement is closed, re-executed, or is used to retrieve the next result from a sequence of multiple results. A ResultSet is also automatically closed when it is garbage collected.
public boolean wasNull() throws java.sql.SQLException
public java.lang.String getString(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2...public boolean getBoolean(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2...public byte getByte(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2,...public short getShort(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2,...public int getInt(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2,...public long getLong(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2,...public float getFloat(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2,...public double getDouble(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2,...public java.math.BigDecimal getBigDecimal(int columnIndex, int scale) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2...
scale
- the number of digits to the right of the decimalpublic byte[] getBytes(int columnIndex) throws java.sql.SQLException
Be warned If the blob is huge, then you may run out of memory.
columnIndex
- the first column is 1, the second is 2, ...public java.sql.Date getDate(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2...public java.sql.Time getTime(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2...public java.sql.Timestamp getTimestamp(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2...public java.io.InputStream getAsciiStream(int columnIndex) throws java.sql.SQLException
Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. Also, a stream may return 0 for available() whether there is data available or not.
columnIndex
- the first column is 1, the second is 2, ...public java.io.InputStream getUnicodeStream(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2...public java.io.InputStream getBinaryStream(int columnIndex) throws java.sql.SQLException
columnIndex
- the first column is 1, the second is 2...public java.lang.String getString(java.lang.String ColumnName) throws java.sql.SQLException
columnName
- is the SQL name of the columnpublic boolean getBoolean(java.lang.String ColumnName) throws java.sql.SQLException
public byte getByte(java.lang.String ColumnName) throws java.sql.SQLException
public short getShort(java.lang.String ColumnName) throws java.sql.SQLException
public int getInt(java.lang.String ColumnName) throws java.sql.SQLException
public long getLong(java.lang.String ColumnName) throws java.sql.SQLException
public float getFloat(java.lang.String ColumnName) throws java.sql.SQLException
public double getDouble(java.lang.String ColumnName) throws java.sql.SQLException
public java.math.BigDecimal getBigDecimal(java.lang.String ColumnName, int scale) throws java.sql.SQLException
public byte[] getBytes(java.lang.String ColumnName) throws java.sql.SQLException
public java.sql.Date getDate(java.lang.String ColumnName) throws java.sql.SQLException
public java.sql.Time getTime(java.lang.String ColumnName) throws java.sql.SQLException
public java.sql.Timestamp getTimestamp(java.lang.String ColumnName) throws java.sql.SQLException
public java.io.InputStream getAsciiStream(java.lang.String ColumnName) throws java.sql.SQLException
public java.io.InputStream getUnicodeStream(java.lang.String ColumnName) throws java.sql.SQLException
public java.io.InputStream getBinaryStream(java.lang.String ColumnName) throws java.sql.SQLException
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
The warning chain is automatically cleared each time a new row is read.
Note: This warning chain only covers warnings caused by ResultSet methods. Any warnings caused by statement methods (such as reading OUT parameters) will be chained on the Statement object.
public void clearWarnings() throws java.sql.SQLException
public java.lang.String getCursorName() throws java.sql.SQLException
In SQL, a result table is retrieved though a cursor that is named. The current row of a result can be updated or deleted using a positioned update/delete statement that references the cursor name.
JDBC supports this SQL feature by providing the name of the SQL cursor used by a ResultSet. The current row of a ResulSet is also the current row of this SQL cursor.
Note: If positioned update is not supported, a SQLException is thrown.
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException
public java.lang.Object getObject(int columnIndex) throws java.sql.SQLException
This method will return the value of the given column as a Java object. The type of the Java object will be the default Java Object type corresponding to the column's SQL type, following the mapping specified in the JDBC specification.
This method may also be used to read database specific abstract data types.
columnIndex
- the first column is 1, the second is 2...public java.lang.Object getObject(java.lang.String ColumnName) throws java.sql.SQLException
This method will return the value of the given column as a Java object. The type of the Java object will be the default Java Object type corresponding to the column's SQL type, following the mapping specified in the JDBC specification.
This method may also be used to read database specific abstract data types.
columnName
- is the SQL name of the columnpublic int findColumn(java.lang.String ColumnName) throws java.sql.SQLException
columnName
- the name of the columnOverview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |