Class ResultSet
java.lang.Object
com.sparsity.sparksee.gdb.ResultSet
ResultSet class.
- Author:
- Sparsity Technologies http://www.sparsity-technologies.com
-
Method Summary
Modifier and TypeMethodDescriptiongetColumn(int index) Gets the value for the given column.voidGets the value for the given column.getColumnDataType(int index) Gets the datatype for the given column.intgetColumnIndex(String name) Gets the column index for the given column name.getColumnName(int index) Gets the name for the given column.getJSON(int rows) Returns rows in JSON format.intGets the number of columns.booleannext()Fetches the next row.voidrewind()Positions the cursor before the first row.
-
Method Details
-
rewind
public void rewind()Positions the cursor before the first row. -
getColumnDataType
Gets the datatype for the given column.- Parameters:
index- [in] Column index.- Returns:
- DataType for the given column.
-
getColumn
Gets the value for the given column.QueryExceptionIf a database access error occurs.
- Parameters:
index- [in] Column index.- Returns:
- The Value of the given column.
-
getNumColumns
public int getNumColumns()Gets the number of columns.Columns are in the range [0...COLUMNS).
- Returns:
- The number of columns.
-
getColumnName
Gets the name for the given column.- Parameters:
index- [in] Column index.- Returns:
- Column name.
-
next
public boolean next()Fetches the next row.A ResultSet cursor is initially positioned before the first row; the first call to the method "Next" makes the first row the current row; the second call makes the second row the current row, and so on.
QueryExceptionIf a database access error occurs.
- Returns:
- TRUE if the next row has been successfully fetched, FALSE otherwise.
-
getJSON
Returns rows in JSON format.Rows are returned from the current position.
JSON representation of the next <rows> rows in the resultset
- Parameters:
rows- [in] Maximum number of rows- Returns:
- JSON representation of the next <rows> rows in the resultset
-
getColumn
Gets the value for the given column.QueryExceptionIf a database access error occurs.
- Parameters:
index- [in] Column index.value- [in|out] Value.
-
getColumnIndex
Gets the column index for the given column name.- Parameters:
name- [in] Column name.- Returns:
- Column index.
-