OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
heavydb.cursor Namespace Reference

Classes

class  Cursor
 

Functions

def make_row_results_set
 

Function Documentation

def heavydb.cursor.make_row_results_set (   data)
Build a results set of python objects.

Parameters
----------
data: QueryResultSet

Returns
-------
results: Iterator[tuple]

Definition at line 179 of file cursor.py.

Referenced by tests.test_results_set.TestRowResults.test_nulls_handled().

180 def make_row_results_set(data):
181  """
182  Build a results set of python objects.
183 
184  Parameters
185  ----------
186  data: QueryResultSet
187 
188  Returns
189  -------
190  results: Iterator[tuple]
191  """
192 
193  if data.row_set.columns:
194  nrows = len(data.row_set.columns[0].nulls)
195  ncols = len(data.row_set.row_desc)
196  columns = [
197  _extract_col_vals(desc, col)
198  for desc, col in zip(data.row_set.row_desc, data.row_set.columns)
199  ]
200  for i in range(nrows):
201  yield tuple(columns[j][i] for j in range(ncols))
def make_row_results_set
Definition: cursor.py:179
def _extract_col_vals
Definition: _parsers.py:89

+ Here is the call graph for this function:

+ Here is the caller graph for this function: