Class com.imaginary.sql.msql.ColumnResultsRow
java.lang.Object
|
+--com.imaginary.sql.msql.ColumnResultsRow
- public class ColumnResultsRow
- extends java.lang.Object
- implements ParsedRow
This class represents the odd unification of JDBC column meta-data
requirements and the format in which mSQL presents them via the
mSQL socket protocol.
Last modified $Date: 1999/07/06 05:55:57 $
- Version:
- $Revision: 1.2 $
- Author:
- George Reese (borg@imaginary.com)
Constructor Summary
|
ColumnResultsRow(java.lang.String cat,
ParsedRow pr)
Constructs a new column results row using the specified
ParsedRow to represent the data coming from mSQL
about the specified table. |
Method Summary
|
java.util.Iterator
|
columns()
Provides an Iterator to help move through the columns. |
java.lang.String
|
get(int col)
Retrieves the specified column as a String . |
boolean
|
hasColumn(int col)
Provides a quick method for determining if this row contains
the specified column number. |
void
|
set(int col,
java.lang.String val)
This method always throws an exception since meta data result
sets are most definitely not updatable. |
int
|
size()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
ColumnResultsRow
public ColumnResultsRow(java.lang.String cat,
ParsedRow pr)
- Constructs a new column results row using the specified
ParsedRow
to represent the data coming from mSQL
about the specified table.
- Parameters:
cat
- the name of the catalog for the meta data
pr
- the row of data from mSQL
columns
public java.util.Iterator columns()
throws java.sql.SQLException
- Provides an
Iterator
to help move through the columns.
- Specified by:
- columns in interface ParsedRow
- Returns:
- the columns as an
Iterator
- Throws:
- java.sql.SQLException - an error occurred parsing data from mSQL
get
public java.lang.String get(int col)
throws java.sql.SQLException
- Retrieves the specified column as a
String
.
- Specified by:
- get in interface ParsedRow
- Parameters:
col
- the desired column- Returns:
- the value of the column as a
String
- Throws:
- java.sql.SQLException - an error occurred parsing data from mSQL
hasColumn
public boolean hasColumn(int col)
- Provides a quick method for determining if this row contains
the specified column number.
- Specified by:
- hasColumn in interface ParsedRow
- Parameters:
col
- the desired column- Returns:
- true if the column exists, false otherwise
set
public void set(int col,
java.lang.String val)
throws java.sql.SQLException
- This method always throws an exception since meta data result
sets are most definitely not updatable.
- Specified by:
- set in interface ParsedRow
- Parameters:
col
- unused
val
- unused- Throws:
- java.sql.SQLException - thrown any time this method is called
size
public int size()
- Description copied from interface:
- Specified by:
- size in interface ParsedRow
- Returns:
- 18