A wrapper for the return value of a select. It basically represents a
table. It has an iterator and each row is represented as a
dictionary.
|
__init__(self,
db=None,
records=[ ] ,
colnames=[ ] ,
compact=True)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
setvirtualfields(self,
**keyed_virtualfields) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
find(self,
f)
returns a set of rows of sorted elements (not filtered in place) |
source code
|
|
|
exclude(self,
f)
returns a set of rows of sorted elements (not filtered in place) |
source code
|
|
|
sort(self,
f,
reverse=False)
returns a list of sorted elements (not sorted in place) |
source code
|
|
|
|
|
as_list(self,
compact=True,
storage_to_dict=True,
datetime_to_str=True)
returns the data as a list or dictionary. |
source code
|
|
|
as_dict(self,
key=' id ' ,
compact=True,
storage_to_dict=True,
datetime_to_str=True)
returns the data as a dictionary of dictionaries
(storage_to_dict=True) or records (False) |
source code
|
|
|
|
|
|
|
|
|
xml(self)
serializes the table using sqlhtml.SQLTABLE (if present) |
source code
|
|
|
json(self,
mode=' object ' )
serializes the table to a JSON list of objects |
source code
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__
|