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)
-
clearWarnings()
-
-
close()
- Closes the result set.
-
findColumn(String)
- Attempts to find the column number associated with the name
given.
-
getAsciiStream(int)
-
-
getAsciiStream(String)
- For performance reasons, you should get values by column
number when at all possible.
-
getBigDecimal(int, int)
-
-
getBigDecimal(String, int)
-
-
getBinaryStream(int)
-
-
getBinaryStream(String)
-
-
getBoolean(int)
-
-
getBoolean(String)
-
-
getByte(int)
-
-
getByte(String)
-
-
getBytes(int)
-
-
getBytes(String)
-
-
getCursorName()
-
-
getDate(int)
- mSQL 1.0 does not support a date type, but 2.0 does.
-
getDate(String)
-
-
getDouble(int)
-
-
getDouble(String)
-
-
getFloat(int)
-
-
getFloat(String)
-
-
getInt(int)
-
-
getInt(String)
-
-
getLong(int)
-
-
getLong(String)
-
-
getMetaData()
-
-
getObject(int)
-
-
getObject(String)
-
-
getShort(int)
-
-
getShort(String)
-
-
getString(int)
-
-
getString(String)
-
-
getTime(int)
-
-
getTime(String)
-
-
getTimestamp(int)
- Timestamps are not really supported in mSQL.
-
getTimestamp(String)
-
-
getUnicodeStream(int)
-
-
getUnicodeStream(String)
-
-
getWarnings()
-
-
next()
- Moves to the next row of data for processing.
-
run()
-
-
wasNull()
-
wasNull
public synchronized boolean wasNull() throws SQLException
- Returns:
- true if the last value read was null
- Throws: SQLException
- never thrown
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
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
getBigDecimal
public synchronized BigDecimal getBigDecimal(String cname,
int scale) throws SQLException
getBigDecimal
public synchronized BigDecimal getBigDecimal(int column,
int scale) throws SQLException
getBinaryStream
public synchronized InputStream getBinaryStream(String cname) throws SQLException
getBinaryStream
public synchronized InputStream getBinaryStream(int column) throws SQLException
getBoolean
public synchronized boolean getBoolean(String cname) throws SQLException
getBoolean
public synchronized boolean getBoolean(int column) throws SQLException
getByte
public synchronized byte getByte(String cname) throws SQLException
getByte
public synchronized byte getByte(int column) throws SQLException
getBytes
public synchronized byte[] getBytes(String cname) throws SQLException
getBytes
public synchronized byte[] getBytes(int column) throws SQLException
getCursorName
public String getCursorName() throws SQLException
getDate
public synchronized Date getDate(String cname) throws SQLException
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.
getDouble
public synchronized double getDouble(String cname) throws SQLException
getDouble
public synchronized double getDouble(int column) throws SQLException
getFloat
public synchronized float getFloat(String cname) throws SQLException
getFloat
public synchronized float getFloat(int column) throws SQLException
getInt
public synchronized int getInt(String cname) throws SQLException
getInt
public synchronized int getInt(int column) throws SQLException
getLong
public synchronized long getLong(String cname) throws SQLException
getLong
public synchronized long getLong(int column) throws SQLException
getMetaData
public ResultSetMetaData getMetaData() throws SQLException
getObject
public synchronized Object getObject(String cname) throws SQLException
getObject
public synchronized Object getObject(int column) throws SQLException
getShort
public synchronized short getShort(String cname) throws SQLException
getShort
public synchronized short getShort(int column) throws SQLException
getString
public synchronized String getString(String cname) throws SQLException
getString
public synchronized String getString(int column) throws SQLException
getTime
public synchronized Time getTime(String cname) throws SQLException
getTime
public synchronized Time getTime(int column) throws SQLException
getTimestamp
public synchronized Timestamp getTimestamp(String cname) throws SQLException
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.
getUnicodeStream
public synchronized InputStream getUnicodeStream(String cname) throws SQLException
getUnicodeStream
public synchronized InputStream getUnicodeStream(int column) throws SQLException
getWarnings
public synchronized SQLWarning getWarnings() throws SQLException
clearWarnings
public synchronized void clearWarnings() throws SQLException
close
public void close() throws SQLException
- Closes the result set.
- Throws: SQLException
- thrown for errors on closing
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
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
run
public void run()
All Packages Class Hierarchy This Package Previous Next Index