All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.imaginary.sql.msql.MsqlQueryData

com.imaginary.sql.msql.MsqlResultSet
   |
   +----com.imaginary.sql.msql.MsqlQueryData

public class MsqlQueryData
extends MsqlResultSet
Represents a result set from some mSQL database call.
Last modified $Date: 1999/07/09 23:16:35 $

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

Variable Index

 o lastColumn

Method Index

 o addRow(MsqlRow)
 o close()
Closes the result set.
 o complete()
Marks the load as completed.
 o findColumn(String)
Attempts to find the column number associated with the name given.
 o getAsciiStream(int)
 o getBinaryStream(int)
 o getBoolean(int)
 o getByte(int)
 o getBytes(int)
 o getColumn(int)
Retrieves the specified column and puts it into the lastColumn attribute.
 o getMetaData()
 o getRow()
 o getString(int)
 o getUnicodeStream(int)
Deprecated.
 o isLast()
This is an expensive operation and should be avoided.
 o loadMetaData()
 o loadResults()
Runs the thread for loading data from the database.
 o next()
Moves to the next row of data for processing.
 o readRow(byte[])
 o wasNull()

Variables

 o lastColumn
 protected String lastColumn

Methods

 o addRow
 protected void addRow(MsqlRow row)
 o close
 public void close() throws SQLException
Closes the result set.

Throws: SQLException
thrown for errors on closing
Overrides:
close in class MsqlResultSet
 o complete
 public void complete()
Marks the load as completed.

Overrides:
complete in class MsqlResultSet
 o findColumn
 public 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 getAsciiStream
 public 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 column cannot be read
 o getBinaryStream
 public InputStream getBinaryStream(int column) throws SQLException
Parameters:
column - the number 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(int column) throws SQLException
Parameters:
column - the number 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(int column) throws SQLException
Parameters:
column - the number 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(int column) throws SQLException
Parameters:
column - the number of the desired column
Returns:
the column as a byte array
Throws: SQLException
thrown in the event of an error reading the column
 o getColumn
 protected void getColumn(int column) throws SQLException
Retrieves the specified column and puts it into the lastColumn attribute.

Parameters:
column - the column being retrieved
Throws: SQLException
the cursor is on a non-existent row
 o getMetaData
 public ResultSetMetaData getMetaData() throws SQLException
Returns:
the meta data associated with this result set
Throws: SQLException
the meta data could not be loaded
 o getRow
 public int getRow() throws SQLException
Returns:
the current row number
Throws: SQLException
this is never thrown
Overrides:
getRow in class MsqlResultSet
 o getString
 public String getString(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 getUnicodeStream
 public InputStream getUnicodeStream(int column) throws SQLException
Note: getUnicodeStream() is deprecated. use getCharacterStream()

Parameters:
column - the number of the desired column
Returns:
the column as an InputStream
Throws: SQLException
thrown in the event of an error reading the column
 o isLast
 public boolean isLast() throws SQLException
This is an expensive operation and should be avoided.

Returns:
true if the current row is the last row
Throws: SQLException
this is never thrown
 o loadMetaData
 protected ResultSetMetaData loadMetaData() throws SQLException
 o loadResults
 protected void loadResults() throws SQLException
Runs the thread for loading data from the database.

 o next
 public 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 readRow
 protected MsqlRow readRow(byte data[]) throws SQLException
 o wasNull
 public boolean wasNull() throws SQLException
Returns:
true if the last value read was null
Throws: SQLException
this is never thrown

All Packages  Class Hierarchy  This Package  Previous  Next  Index