Templates are ways of saving queries and allowing others to run them
simply. They are the main interface to querying in the webapp
A template is a subclass of query that comes predefined. They are
typically retrieved from the webservice and run by specifying the
values for their existing constraints. They are a concise and
powerful way of running queries in the webapp.
Being subclasses of query, everything is true of them that is true
of a query. They are just less work, as you don't have to design each
one. Also, you can store your own templates in the web-app, and then
access them as a private webservice method, from anywhere, making
them a kind of query in the cloud - for this you will need to
authenticate by providing log in details to the service.
The most significant difference is how constraint values are
specified for each set of results.
|
|
dict
|
|
string
|
|
Template
|
|
intermine.webservice.ResultIterator
|
results(self,
row=' object ' ,
start=0,
size=None,
**con_values)
This method returns the same values with the same options as the
method of the same name in Query (see intermine.query.Query). |
source code
|
|
list
|
get_results_list(self,
row=' object ' ,
start=0,
size=None,
**con_values)
This method performs the same as the method of the same name in
Query, and it shares the semantics of Template.results(). |
source code
|
|
|
|
iterable<intermine.webservice.ResultRow>
|
rows(self,
start=0,
size=None,
**con_values)
Get an iterator over the rows returned by this query |
source code
|
|
int
|
count(self,
**con_values)
Obtain the number of rows a particular query will return, without
having to fetch and parse all the actual data. |
source code
|
|
Inherited from Query :
__iter__ ,
__len__ ,
__str__ ,
add_constraint ,
add_join ,
add_path_description ,
add_sort_order ,
add_view ,
children ,
clear_view ,
clone ,
column ,
first ,
get_constraint ,
get_default_sort_order ,
get_list_append_uri ,
get_list_upload_uri ,
get_logic ,
get_sort_order ,
get_subclass_dict ,
one ,
outerjoin ,
prefix_path ,
set_logic ,
to_Node ,
to_formatted_xml ,
to_xml ,
validate_logic ,
validate_sort_order ,
verify ,
verify_constraint_paths ,
verify_join_paths ,
verify_pd_paths ,
verify_views ,
where
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|