|
|
__init__(self,
tablename,
id=None,
prefix=None,
uid=None,
filter=None,
vars=None,
parent=None,
linked=None,
linktable=None,
alias=None,
components=None,
filter_component=None,
include_deleted=False,
approved=True,
unapproved=False,
context=False,
extra_filters=None)
Constructor |
source code
|
|
|
|
build_query(self,
id=None,
uid=None,
filter=None,
vars=None,
extra_filters=None,
filter_component=None)
Query builder |
source code
|
|
|
|
|
|
|
add_component_filter(self,
alias,
f=None)
Extend the resource filter of a particular component, does not affect
the master resource filter (as opposed to add_filter) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
count(self,
left=None,
distinct=False)
Get the total number of available records in this resource |
source code
|
|
|
|
select(self,
fields,
start=0,
limit=None,
left=None,
orderby=None,
groupby=None,
distinct=False,
virtual=True,
count=False,
getids=False,
as_rows=False,
represent=False,
show_links=True,
raw_data=False)
Extract data from this resource |
source code
|
|
|
|
|
|
|
|
|
|
delete(self,
format=None,
cascade=False,
replaced_by=None,
log_errors=False)
Delete all records in this resource |
source code
|
|
|
|
approve(self,
components=(),
approve=True,
approved_by=None)
Approve all records in this resource |
source code
|
|
|
|
|
|
|
merge(self,
original_id,
duplicate_id,
replace=None,
update=None,
main=True)
Merge two records, see also S3RecordMerger.merge |
source code
|
|
|
|
datatable(self,
fields=None,
start=0,
limit=None,
left=None,
orderby=None,
distinct=False)
Generate a data table of this resource |
source code
|
|
|
|
datalist(self,
fields=None,
start=0,
limit=None,
left=None,
orderby=None,
distinct=False,
list_id=None,
layout=None)
Generate a data list of this resource |
source code
|
|
|
|
json(self,
fields=None,
start=0,
limit=None,
left=None,
distinct=False,
orderby=None)
Export a JSON representation of the resource. |
source code
|
|
|
|
load(self,
fields=None,
skip=None,
start=None,
limit=None,
orderby=None,
virtual=True,
cacheable=False)
Loads records from the resource, applying the current filters, and
stores them in the instance. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get(self,
key,
component=None,
link=None)
Get component records for a record currently stored in this instance. |
source code
|
|
|
|
get_id(self)
Get the IDs of all records currently stored in this instance |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export_xml(self,
start=None,
limit=None,
msince=None,
fields=None,
dereference=True,
maxdepth=MAXDEPTH,
mcomponents=DEFAULT,
rcomponents=None,
references=None,
mdata=False,
stylesheet=None,
as_tree=False,
as_json=False,
maxbounds=False,
filters=None,
pretty_print=False,
location_data=None,
map_data=None,
target=None,
**args)
Export this resource as S3XML |
source code
|
|
|
|
export_tree(self,
start=0,
limit=None,
msince=None,
fields=None,
references=None,
dereference=True,
maxdepth=MAXDEPTH,
mcomponents=None,
rcomponents=None,
filters=None,
mdata=False,
maxbounds=False,
xmlformat=None,
location_data=None,
map_data=None,
target=None)
Export the resource as element tree |
source code
|
|
|
|
import_xml(self,
source,
files=None,
id=None,
format="xml",
stylesheet=None,
extra_data=None,
ignore_errors=False,
job_id=None,
commit_job=True,
delete_job=False,
strategy=None,
update_policy=None,
conflict_policy=None,
last_sync=None,
onconflict=None,
**args)
XML Importer |
source code
|
|
|
|
import_tree(self,
record_id,
tree,
job_id=None,
ignore_errors=False,
delete_job=False,
commit_job=True,
strategy=None,
update_policy=None,
conflict_policy=None,
last_sync=None,
onconflict=None)
Import data from an S3XML element tree. |
source code
|
|
|
|
export_options(self,
component=None,
fields=None,
only_last=False,
show_uids=False,
hierarchy=False,
as_json=False)
Export field options of this resource as element tree |
source code
|
|
|
|
|
|
|
export_struct(self,
meta=False,
options=False,
references=False,
stylesheet=None,
as_json=False,
as_tree=False)
Get the structure of the resource |
source code
|
|
|
|
|
|
|
resolve_selectors(self,
selectors,
skip_components=False,
extra_fields=True,
show=True)
Resolve a list of field selectors against this resource |
source code
|
|
|
|
|
|
|
split_fields(self,
skip=DEFAULT,
data=None,
references=None)
Split the readable fields in the resource table into reference and
non-reference fields. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
limitby(self,
start=0,
limit=0)
Convert start+limit parameters into a limitby tuple |
source code
|
|
|
|
|
|
|
|
|
|
link_id(self,
master_id,
component_id)
Helper method to find the link table entry ID for a pair of linked
records. |
source code
|
|
|
|
component_id(self,
master_id,
link_id)
Helper method to find the component record ID for a particular link
of a particular master record |
source code
|
|
|
|
|
|
|
|
|
|
axisfilter(self,
axes)
Get all values for the given S3ResourceFields (axes) which match the
resource query, used in pivot tables to filter out additional values
where dimensions can have multiple values per record |
source code
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|