All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.imaginary.sql.msql.MsqlResultSet

java.lang.Object
   |
   +----com.imaginary.sql.msql.MsqlResultSet

public class MsqlResultSet
extends Object
implements ResultSet, Runnable
The MsqlResultSet class implements the JDBC ResultSet interface. This class represents a SQL result set whose values can be retrieved through the class' methods. This class should never be directly referenced. Instead, you should use the JDBC API.
Last modified $Date: 1999/01/22 05:33:44 $

Version:
$Revision: 1.1.2.1.2.1 $
Author:
George Reese (borg@imaginary.com)

Method Index

 o clearWarnings()
 o close()
Closes the result set.
 o findColumn(String)
Attempts to find the column number associated with the name given.
 o getAsciiStream(int)
 o getAsciiStream(String)
For performance reasons, you should get values by column number when at all possible.
 o getBigDecimal(int, int)
 o getBigDecimal(String, int)
 o getBinaryStream(int)
 o getBinaryStream(String)
 o getBoolean(int)
 o getBoolean(String)
 o getByte(int)
 o getByte(String)
 o getBytes(int)
 o getBytes(String)
 o getCursorName()
 o getDate(int)
mSQL 1.0 does not support a date type, but 2.0 does.
 o getDate(String)
 o getDouble(int)
 o getDouble(String)
 o getFloat(int)
 o getFloat(String)
 o getInt(int)
 o getInt(String)
 o getLong(int)
 o getLong(String)
 o getMetaData()
 o getObject(int)
 o getObject(String)
 o getShort(int)
 o getShort(String)
 o getString(int)
 o getString(String)
 o getTime(int)
 o getTime(String)
 o getTimestamp(int)
Timestamps are not really supported in mSQL.
 o getTimestamp(String)
 o getUnicodeStream(int)
 o getUnicodeStream(String)
 o getWarnings()
 o next()
Moves to the next row of data for processing.
 o run()
 o wasNull()

Methods

 o wasNull
 public synchronized boolean wasNull() throws SQLException
Returns:
true if the last value read was null
Throws: SQLException
never thrown
 o getAsciiStream
 public synchronized InputStream getAsciiStream(String cname) throws SQLException
For performance reasons, you should get values by column number when at all possible.

Parameters:
cname - the name of the desired column
Returns:
an ASCII input stream for the column
Throws: SQLException
thrown when the column cannot be read
 o getAsciiStream
 public synchronized InputStream getAsciiStream(int column) throws SQLException
Parameters:
column - the column number for the desired column
Returns:
an ASCII input stream for the desired column
Throws: SQLException
thrown when the columb cannot be read
 o getBigDecimal
 public synchronized BigDecimal getBigDecimal(String cname,
                                              int scale) throws SQLException
 o getBigDecimal
 public synchronized BigDecimal getBigDecimal(int column,
                                              int scale) throws SQLException
 o getBinaryStream
 public synchronized InputStream getBinaryStream(String cname) throws SQLException
 o getBinaryStream
 public synchronized InputStream getBinaryStream(int column) throws SQLException
 o getBoolean
 public synchronized boolean getBoolean(String cname) throws SQLException
 o getBoolean
 public synchronized boolean getBoolean(int column) throws SQLException
 o getByte
 public synchronized byte getByte(String cname) throws SQLException
 o getByte
 public synchronized byte getByte(int column) throws SQLException
 o getBytes
 public synchronized byte[] getBytes(String cname) throws SQLException
 o getBytes
 public synchronized byte[] getBytes(int column) throws SQLException
 o getCursorName
 public String getCursorName() throws SQLException
 o getDate
 public synchronized Date getDate(String cname) throws SQLException
 o getDate
 public synchronized Date getDate(int column) throws SQLException
mSQL 1.0 does not support a date type, but 2.0 does. This method allows any version of mSQL to store dates as a CHAR type. It also allows mSQL 2.0 to store them as TEXT or DATE types. If you choose to store your date as a CHAR or TEXT type for any reason, you must store the date as a long converted into a CHAR or in DD-Mon-YYYY.

 o getDouble
 public synchronized double getDouble(String cname) throws SQLException
 o getDouble
 public synchronized double getDouble(int column) throws SQLException
 o getFloat
 public synchronized float getFloat(String cname) throws SQLException
 o getFloat
 public synchronized float getFloat(int column) throws SQLException
 o getInt
 public synchronized int getInt(String cname) throws SQLException
 o getInt
 public synchronized int getInt(int column) throws SQLException
 o getLong
 public synchronized long getLong(String cname) throws SQLException
 o getLong
 public synchronized long getLong(int column) throws SQLException
 o getMetaData
 public ResultSetMetaData getMetaData() throws SQLException
 o getObject
 public synchronized Object getObject(String cname) throws SQLException
 o getObject
 public synchronized Object getObject(int column) throws SQLException
 o getShort
 public synchronized short getShort(String cname) throws SQLException
 o getShort
 public synchronized short getShort(int column) throws SQLException
 o getString
 public synchronized String getString(String cname) throws SQLException
 o getString
 public synchronized String getString(int column) throws SQLException
 o getTime
 public synchronized Time getTime(String cname) throws SQLException
 o getTime
 public synchronized Time getTime(int column) throws SQLException
 o getTimestamp
 public synchronized Timestamp getTimestamp(String cname) throws SQLException
 o getTimestamp
 public synchronized Timestamp getTimestamp(int column) throws SQLException
Timestamps are not really supported in mSQL. To make use of them, store timestamps in char fields.

 o getUnicodeStream
 public synchronized InputStream getUnicodeStream(String cname) throws SQLException
 o getUnicodeStream
 public synchronized InputStream getUnicodeStream(int column) throws SQLException
 o getWarnings
 public synchronized SQLWarning getWarnings() throws SQLException
 o clearWarnings
 public synchronized void clearWarnings() throws SQLException
 o close
 public void close() throws SQLException
Closes the result set.

Throws: SQLException
thrown for errors on closing
 o findColumn
 public synchronized int findColumn(String name) throws SQLException
Attempts to find the column number associated with the name given. It is recommended to avoid this method (as well as any method accessing a column by name) as it is very, very slow. It will first search for a match in the form of table.column. If you specify only the column, however, it will then look for a match solely on column name.

Parameters:
name - the name of the desired column
Returns:
the column number for the specified column name
Throws: SQLException
thrown on a read error
 o next
 public synchronized boolean next() throws SQLException
Moves to the next row of data for processing. If there are no more rows to be processed, then it will return false.

Returns:
true if there are results to be processed, false otherwise
Throws: SQLException
thrown if a read error occurs
 o run
 public void run()

All Packages  Class Hierarchy  This Package  Previous  Next  Index