def table_to_rowlist(table_, conds):
  "helper for wherex_to_rowlist. (table.Table, [exp, ...]) -> [Row, ...]"
  if isinstance(table_, scope.SyntheticTable):
    raise NotImplementedError('todo: synthetic tables to Row[]')
  elif isinstance(table_, table.Table):
    rowtype = RowType([(colx.name, colx) for colx in table_.fields])
    rows = [
      Row(RowSource(table_, i), rowtype, row)
      for i, row in enumerate(table_.rows)
    ]
    raise NotImplementedError # how does filtering work?
  else:
    raise TypeError('bad type for table', type(table), table)
def table_to_rowlist ( table_ , conds ) : if isinstance ( table_ , scope . SyntheticTable ) : raise NotImplementedError ( 'todo: synthetic tables to Row[]' ) elif isinstance ( table_ , table . Table ) : rowtype = RowType ( [ ( colx . name , colx ) for colx in table_ . fields ] ) rows = [ Row ( RowSource ( table_ , i ) , rowtype , row ) for i , row in enumerate ( table_ . rows ) ] raise NotImplementedError else : raise TypeError ( 'bad type for table' , type ( table ) , table )
helper for wherex_to_rowlist. (table.Table, [exp, ...]) -> [Row, ...]