SparkseePython3 6.1.0
sparksee.ResultSet Class Reference

ResultSet class. More...

Public Member Functions

 rewind (self)
 Positions the cursor before the first row.
 get_column_data_type (self, index)
 Gets the datatype for the given column.
 get_column (self, index)
 Gets the value for the given column.
 get_num_columns (self)
 Gets the number of columns.
 get_column_name (self, index)
 Gets the name for the given column.
 next (self)
 Fetches the next row.
 get_j_s_o_n (self, rows)
 Returns rows in JSON format.
 get_column (self, index, value)
 Gets the value for the given column.
 get_column_index (self, name)
 Gets the column index for the given column name.
 is_closed (self)
 Gets if the ResultSet instance has been closed or not.

Detailed Description

ResultSet class.

Author
Sparsity Technologies http://www.sparsity-technologies.com

Member Function Documentation

◆ get_column() [1/2]

sparksee.ResultSet.get_column ( self,
index )

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.

◆ get_column() [2/2]

sparksee.ResultSet.get_column ( self,
index,
value )

Gets the value for the given column.

QueryExceptionIf a database access error occurs.

Parameters
index[in] Column index.
value[in|out] Value.

◆ get_column_data_type()

sparksee.ResultSet.get_column_data_type ( self,
index )

Gets the datatype for the given column.

Parameters
index[in] Column index.
Returns
DataType for the given column.

◆ get_column_index()

sparksee.ResultSet.get_column_index ( self,
name )

Gets the column index for the given column name.

Parameters
name[in] Column name.
Returns
Column index.

◆ get_column_name()

sparksee.ResultSet.get_column_name ( self,
index )

Gets the name for the given column.

Parameters
index[in] Column index.
Returns
Column name.

◆ get_j_s_o_n()

sparksee.ResultSet.get_j_s_o_n ( self,
rows )

Returns rows in JSON format.

Rows are returned from the current position.

Parameters
rows[in] Maximum number of rows
Returns
JSON representation of the next <rows> rows in the resultset

◆ get_num_columns()

sparksee.ResultSet.get_num_columns ( self)

Gets the number of columns.

Columns are in the range [0...COLUMNS).

Returns
The number of columns.

◆ is_closed()

sparksee.ResultSet.is_closed ( self)

Gets if the ResultSet instance has been closed or not.

See also
#close()
Returns
TRUE if the ResultSet instance has been closed, FALSE otherwise.

◆ next()

sparksee.ResultSet.next ( self)

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.