|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--litebase.ResultSet
This class represents a set or rows resulting from a
LitebaseConnection.executeQuery method call.
Here's an example:
ResultSet rs = driver.executeQuery("select name, salary, age from person");
while (rs.next())
Vm.debug(pad(rs.getString("name"),32) + pad(rs.getString("salary"),16) + rs.getInt("age")+" years");
| Field Summary | |
protected java.lang.Object |
bag
|
| Method Summary | |
boolean |
absolute(int row)
Places this RecordSet cursor at the given absolute row. |
void |
afterLast()
Places the cursor after the last record |
void |
beforeFirst()
Places the cursor before the first record |
void |
close()
Releases all memory allocated for this object. |
boolean |
first()
Places the cursor in the first record |
char[] |
getChars(int col)
Given the column index (starting from 1), returns a char array that is represented by this column. |
char[] |
getChars(java.lang.String colName)
Given the column name (case insensitive), returns a char array that is represented by this column. |
waba.util.Date |
getDate(int col)
Given the column index (starting from 1), returns a Date value that is represented by this column. |
waba.util.Date |
getDate(java.lang.String colName)
Given the column name (case insensitive), returns an Date value that is represented by this column. |
waba.sys.Time |
getDateTime(int col)
Given the column index (starting from 1), returns a Time (correspondent to DATETIME LitebaseConnection data type) value that is represented by this column. |
waba.sys.Time |
getDateTime(java.lang.String colName)
Given the column name (case insensitive), returns a Time (correspondent to DATETIME LitebaseConnection data type) value that is represented by this column. |
double |
getDouble(int col)
Given the column index (starting from 1), returns a double value that is represented by this column. |
double |
getDouble(java.lang.String colName)
Given the column name (case insensitive), returns a double value that is represented by this column. |
float |
getFloat(int col)
Given the column index (starting from 1), returns a float value that is represented by this column. |
float |
getFloat(java.lang.String colName)
Given the column name (case insensitive), returns a float value that is represented by this column. |
int |
getInt(int col)
Given the column index (starting from 1), returns an int value that is represented by this column. |
int |
getInt(java.lang.String colName)
Given the column name (case insensitive), returns an int value that is represented by this column. |
long |
getLong(int col)
Given the column index (starting from 1), returns a long value that is represented by this column. |
long |
getLong(java.lang.String colName)
Given the column name (case insensitive), returns a long value that is represented by this column. |
ResultSetMetaData |
getResultSetMetaData()
Returns the metadata for this resultset. |
int |
getRow()
Returns the current physical row of the Table that the cursor is. |
int |
getRowCount()
Returns the number of rows of this resultset |
short |
getShort(int col)
Given the column index (starting from 1), returns a short value that is represented by this column. |
short |
getShort(java.lang.String colName)
Given the column name (case insensitive), returns a short value that is represented by this column. |
java.lang.String |
getString(int col)
Given the column index (starting from 1), returns a String that is represented by this column. |
java.lang.String |
getString(java.lang.String colName)
Given the column name (case insensitive), returns a String that is represented by this column. |
java.lang.String[][] |
getStrings()
Returns all Strings of this resultset in order, starting from the first record. |
java.lang.String[][] |
getStrings(int count)
This is the most powerful method of this class. |
java.lang.String[][] |
getStrings(int count,
boolean forward,
boolean invert)
Deprecated. Use getStrings(count) instead. |
boolean |
last()
Places the cursor in the last record |
boolean |
next()
Returns the next record of this ResultSet |
boolean |
prev()
Returns the previous record of this ResultSet |
boolean |
relative(int rows)
Moves the cursor rows in distance. |
void |
setDecimalPlaces(int col,
int places)
Sets the number of decimal places that the given column (starting from 1) will have when being converted to String.
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected java.lang.Object bag
| Method Detail |
public ResultSetMetaData getResultSetMetaData()
public void close()
public void beforeFirst()
public void afterLast()
public boolean first()
public boolean last()
public boolean next()
public boolean prev()
public short getShort(int col)
public short getShort(java.lang.String colName)
public int getInt(int col)
public int getInt(java.lang.String colName)
public long getLong(int col)
public long getLong(java.lang.String colName)
public float getFloat(int col)
public float getFloat(java.lang.String colName)
public double getDouble(int col)
public double getDouble(java.lang.String colName)
public char[] getChars(int col)
public char[] getChars(java.lang.String colName)
public java.lang.String getString(int col)
setDecimalPlaces method.public java.lang.String getString(java.lang.String colName)
setDecimalPlaces method.
This method is slightly slower then the method that accepts a column index.
public java.lang.String[][] getStrings(int count,
boolean forward,
boolean invert)
count - the number of rows to be fetched, or -1 for all.
IMPORTANT: The total number of rows being fetched cannot be greater
than 16300 due to stack limits.forward - determines the direction where the rows will be fetched.invert - determines if the returning array will be inverted or not.getStrings(int)public java.lang.String[][] getStrings(int count)
count - the number of rows to be fetched, or -1 for all.
IMPORTANT: The total number of rows being fetched cannot be greater
than 16300 due to stack limits.public java.lang.String[][] getStrings()
IMPORTANT: The total number of rows being fetched cannot be greater
than 16300 due to stack limits.public waba.util.Date getDate(java.lang.String colName)
public waba.util.Date getDate(int col)
public waba.sys.Time getDateTime(java.lang.String colName)
public waba.sys.Time getDateTime(int col)
public boolean absolute(int row)
getRow method.public boolean relative(int rows)
rows in distance. Returns false if it can't
move in that direction, true if it moved at least 1 row in the direction.
Can be greater or lower than zero.
Note that you cannot use this method right after you do a select; you must
call first or last before.public int getRow()
absolute method.
public void setDecimalPlaces(int col,
int places)
String.
Must be used for columns of type DOUBLE or FLOAT only.public int getRowCount()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||