示例#1
0
 def _query_to_rows(self, qr):
     """ Converts a query result to rows
     """
     columns = qr['columns']
     datapoints = self._datapoints(qr)
     for dp in datapoints:
         dp = select_columns(dp, columns, self.cols_time)
         row = datapoint_to_row(dp)
         yield row
示例#2
0
 def _query_to_rows(self, qr):
     """ Converts a query result to rows
     """
     columns = qr['columns']
     datapoints = self._datapoints(qr)
     for dp in datapoints:
         dp = select_columns(dp, columns, self.cols_time)
         row = datapoint_to_row(dp)
         yield row
示例#3
0
 def rows(self):
     i = 0
     try:
         with self.file_callable() as f:
             data = json.load(f)
         colspec = parse_colspec(data)
         rows = brewpi_log_rows(data)
         for r in rows:
             yield select_columns(r, colspec, ts_columns)
     except Exception as e:
         raise ImportError('error decoding "%s"' % self.file_callable) from e
示例#4
0
 def rows(self):
     i = 0
     try:
         with self.file_callable() as f:
             data = json.load(f)
         colspec = parse_colspec(data)
         rows = brewpi_log_rows(data)
         for r in rows:
             yield select_columns(r, colspec, ts_columns)
     except Exception as e:
         raise ImportError('error decoding "%s"' %
                           self.file_callable) from e