All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.imaginary.sql.msql.MsqlResultSet

com.imaginary.sql.msql.MsqlResultSet

public abstract class MsqlResultSet
Acts as an abstract base class for all of the different kinds of result sets supported by mSQL-JDBC.
Last modified $Date: 1999/07/09 23:16:35 $

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

Variable Index

 o log

Method Index

 o clearWarnings()
mSQL does not generate warnings, so this method is a NO-OP
 o close()
A NO-OP for this base class.
 o complete()
This method is called to mark a result set as complete.
 o getAsciiStream(String)
For performance reasons, you should get values by column number when at all possible.
 o getBigDecimal(int)
 o getBigDecimal(int, int)
Deprecated.
 o getBigDecimal(String)
Avoid getting columns by name whenever possible.
 o getBigDecimal(String, int)
Avoid getting columns by name whenever possible. Deprecated.
 o getBinaryStream(String)
Avoid getting columns by name whenever possible.
 o getBoolean(String)
Avoid getting columns by name whenever possible.
 o getByte(String)
Avoid getting columns by name whenever possible.
 o getBytes(String)
Avoid getting columns by name whenever possible.
 o getCharacterStream(int)
 o getCharacterStream(String)
Avoid getting columns by name whenever possible.
 o getCursorName()
 o getDate(int)
mSQL 1.0 does not support a date type, but 2.0 does.
 o getDate(int, Calendar)
mSQL 1.0 does not support a date type, but 2.0 does.
 o getDate(String)
Avoid getting columns by name whenever possible.
 o getDate(String, Calendar)
Avoid getting columns by name whenever possible.
 o getDouble(int)
 o getDouble(String)
Avoid getting columns by name whenever possible.
 o getEncoding()
 o getFloat(int)
 o getFloat(String)
Avoid getting columns by name whenever possible.
 o getInt(int)
 o getInt(String)
Avoid getting columns by name whenever possible.
 o getLong(int)
 o getLong(String)
Avoid getting columns by name whenever possible.
 o getObject(int)
 o getObject(String)
Avoid getting columns by name whenever possible.
 o getRow()
 o getShort(int)
 o getShort(String)
Avoid getting columns by name whenever possible.
 o getStatement()
 o getString(String)
Avoid getting columns by name whenever possible.
 o getTime(int)
 o getTime(int, Calendar)
 o getTime(String)
Avoid getting columns by name whenever possible.
 o getTime(String, Calendar)
Avoid getting columns by name whenever possible.
 o getTimestamp(int)

Timestamps are not really supported in mSQL.

 o getTimestamp(int, Calendar)

Timestamps are not really supported in mSQL.

 o getTimestamp(String)

Timestamps are not really supported in mSQL.

 o getTimestamp(String, Calendar)

Timestamps are not really supported in mSQL.

 o getUnicodeStream(String)
Avoid getting columns by name whenever possible. Deprecated.
 o getWarnings()
mSQL does not generate warnings, so this method always returns null.
 o isAfterLast()
Determines if the driver is positioned after the last row.
 o isBeforeFirst()
Because of the way the driver works, isAfterLast() == isBeforeFirst().

Variables

 o log
 protected MsqlLog log

Methods

 o clearWarnings
 public void clearWarnings() throws SQLException
mSQL does not generate warnings, so this method is a NO-OP

Throws: SQLException
this is never thrown
 o close
 public void close() throws SQLException
A NO-OP for this base class.

Throws: SQLException
this is never thrown
 o complete
 public void complete()
This method is called to mark a result set as complete.

 o getAsciiStream
 public 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 getBigDecimal
 public BigDecimal getBigDecimal(String cname) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the column being sought
Returns:
the specified column as a BigDecimal
Throws: SQLException
thrown when the column cannot be read
 o getBigDecimal
 public BigDecimal getBigDecimal(int column) throws SQLException
Parameters:
column - the column number of the desired column
Returns:
the specified column as a BigDecimal
Throws: SQLException
thrown when the column cannot be read
 o getBigDecimal
 public BigDecimal getBigDecimal(String cname,
                                 int scale) throws SQLException
Note: getBigDecimal() is deprecated.

Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the column being sought
scale - the scale with which the BigDecimal should be constructed
Returns:
the specified column as a BigDecimal
Throws: SQLException
thrown when the column cannot be read
 o getBigDecimal
 public BigDecimal getBigDecimal(int column,
                                 int scale) throws SQLException
Note: getBigDecimal() is deprecated.

Parameters:
column - the column number of the desired column
scale - the scale with which the BigDecimal should be constructed
Returns:
the specified column as a BigDecimal
Throws: SQLException
thrown when the column cannot be read
 o getBinaryStream
 public InputStream getBinaryStream(String cname) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
Returns:
the column as an InputStream
Throws: SQLException
thrown in the event of an error reading the column
 o getBoolean
 public boolean getBoolean(String cname) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
Returns:
the column as a boolean
Throws: SQLException
thrown in the event of an error reading the column
 o getByte
 public byte getByte(String cname) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
Returns:
the column as a byte
Throws: SQLException
thrown in the event of an error reading the column
 o getBytes
 public byte[] getBytes(String cname) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
Returns:
the column as a byte array
Throws: SQLException
thrown in the event of an error reading the column
 o getCharacterStream
 public Reader getCharacterStream(String cname) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
Returns:
the column as a Reader
Throws: SQLException
thrown in the event of an error reading the column
 o getCharacterStream
 public Reader getCharacterStream(int column) throws SQLException
Parameters:
column - the number of the desired column
Returns:
the column as a Reader
Throws: SQLException
thrown in the event of an error reading the column
 o getCursorName
 public String getCursorName() throws SQLException
Returns:
the cursor name
Throws: SQLException
this is always thrown as mSQL does not support named cursors
 o getDate
 public Date getDate(String cname) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
Returns:
the column as a Date
Throws: SQLException
thrown in the event of an error reading the column
 o getDate
 public 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.

Parameters:
column - the number of desired column
Returns:
a Date representation of the specified column
Throws: SQLException
a database error occurred
 o getDate
 public Date getDate(String cname,
                     Calendar cal) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
cal - the Calendar to use in constructing the Date
Returns:
the column as a Date
Throws: SQLException
thrown in the event of an error reading the column
 o getDate
 public Date getDate(int column,
                     Calendar cal) 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.

Parameters:
column - the number of desired column
cal - the Calendar to use in constructing the date
Returns:
a Date representation of the specified column
Throws: SQLException
a database error occurred
 o getDouble
 public double getDouble(String cname) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
Returns:
the column as a double
Throws: SQLException
thrown in the event of an error reading the column
 o getDouble
 public double getDouble(int column) throws SQLException
Parameters:
column - the number of the desired column
Returns:
the column as a double
Throws: SQLException
thrown in the event of an error reading the column
 o getEncoding
 public String getEncoding()
 o getFloat
 public float getFloat(String cname) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
Returns:
the column as a float
Throws: SQLException
thrown in the event of an error reading the column
 o getFloat
 public float getFloat(int column) throws SQLException
Parameters:
column - the number of the desired column
Returns:
the column as a float
Throws: SQLException
thrown in the event of an error reading the column
 o getInt
 public int getInt(String cname) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
Returns:
the column as an int
Throws: SQLException
thrown in the event of an error reading the column
 o getInt
 public int getInt(int column) throws SQLException
Parameters:
column - the number of the desired column
Returns:
the column as an int
Throws: SQLException
thrown in the event of an error reading the column
 o getLong
 public long getLong(String cname) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
Returns:
the column as a long
Throws: SQLException
thrown in the event of an error reading the column
 o getLong
 public long getLong(int column) throws SQLException
Parameters:
column - the number of the desired column
Returns:
the column as a long
Throws: SQLException
thrown in the event of an error reading the column
 o getObject
 public Object getObject(String cname) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
Returns:
the column as a Java object based on the standard SQL -> Java mapping
Throws: SQLException
thrown in the event of an error reading the column
 o getObject
 public Object getObject(int column) throws SQLException
Parameters:
column - the number of the desired column
Returns:
the column as a Java object based on the standard SQL -> Java mapping
Throws: SQLException
thrown in the event of an error reading the column
 o getRow
 public abstract int getRow() throws SQLException
 o getShort
 public short getShort(String cname) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
Returns:
the column as a short
Throws: SQLException
thrown in the event of an error reading the column
 o getShort
 public short getShort(int column) throws SQLException
Parameters:
column - the number of the desired column
Returns:
the column as a short
Throws: SQLException
thrown in the event of an error reading the column
 o getStatement
 public Statement getStatement() throws SQLException
Returns:
the Statement that generated this result set
Throws: SQLException
this is never thrown
 o getString
 public String getString(String cname) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
Returns:
the column as a Java String
Throws: SQLException
thrown in the event of an error reading the column
 o getTime
 public Time getTime(String cname) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
Returns:
the column as a Time object
Throws: SQLException
thrown in the event of an error reading the column
 o getTime
 public Time getTime(int column) throws SQLException
Parameters:
column - the number of the desired column
Returns:
the column as a Java String
Throws: SQLException
thrown in the event of an error reading the column
 o getTime
 public Time getTime(String cname,
                     Calendar cal) throws SQLException
Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
cal - the Calendar to use in creating the Time object
Returns:
the column as a Time object
Throws: SQLException
thrown in the event of an error reading the column
 o getTime
 public Time getTime(int column,
                     Calendar cal) throws SQLException
Parameters:
column - the number of the desired column
cal - the Calendar to use in creating the Time object
Returns:
the column as a Java String
Throws: SQLException
thrown in the event of an error reading the column
 o getTimestamp
 public Timestamp getTimestamp(String cname) throws SQLException

Timestamps are not really supported in mSQL. To make use of them, store timestamps in char fields.

Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
Returns:
the column as a Timestamp
Throws: SQLException
thrown in the event of an error reading the column
 o getTimestamp
 public Timestamp getTimestamp(int column) throws SQLException

Timestamps are not really supported in mSQL. To make use of them, store timestamps in char fields.

Parameters:
column - the number of the desired column
Returns:
the column as a Timestamp
Throws: SQLException
thrown in the event of an error reading the column
 o getTimestamp
 public Timestamp getTimestamp(String cname,
                               Calendar cal) throws SQLException

Timestamps are not really supported in mSQL. To make use of them, store timestamps in char fields.

Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
cal - this is currently ignored
Returns:
the column as a Timestamp
Throws: SQLException
thrown in the event of an error reading the column
 o getTimestamp
 public Timestamp getTimestamp(int column,
                               Calendar c) throws SQLException

Timestamps are not really supported in mSQL. To make use of them, store timestamps in char fields.

Parameters:
column - the number of the desired column
c - this is currently ignored
Returns:
the column as a Timestamp
Throws: SQLException
thrown in the event of an error reading the column
 o getUnicodeStream
 public InputStream getUnicodeStream(String cname) throws SQLException
Note: getUnicodeStream() is deprecated. use the getCharacterStream()

Avoid getting columns by name whenever possible.

Parameters:
cname - the name of the desired column
Returns:
the column as an InputStream
Throws: SQLException
thrown in the event of an error reading the column
 o getWarnings
 public SQLWarning getWarnings() throws SQLException
mSQL does not generate warnings, so this method always returns null.

Returns:
null
Throws: SQLException
this is never thrown
 o isAfterLast
 public boolean isAfterLast() throws SQLException
Determines if the driver is positioned after the last row.

Returns:
true if the result set is positioned after the last row
Throws: SQLException
this is never thrown
 o isBeforeFirst
 public boolean isBeforeFirst() throws SQLException
Because of the way the driver works, isAfterLast() == isBeforeFirst().

Returns:
true if the result set is positioned before the first row
Throws: SQLException
this is never thrown

All Packages  Class Hierarchy  This Package  Previous  Next  Index