Package sqltriples :: Module Query :: Class Query
[show private | hide private]
[frames | no frames]

Class Query

AbstractQuery --+
                |
               Query

Known Subclasses:
Results

An abstract class providing support for lazy query evaluation.

Method Summary
  __init__(self, store, functions)
  __getitem__(self, i)
  __len__(self)
  __repr__(self)
  get_query(self, index, constraints)
Return a query clause, associated values, and an updated table index (as a 3-tuple) for this object's query defined using the given table 'index' and the supplied, optional 'constraints' text.
  get_subquery(self, parent_columns, parent_index, index, match_first, match_parent, match_child)
Make a subquery for this object using the given 'parent_columns' (indicating the columns which connect with this object's exposed columns), a 'parent_index' (indicating the table index used in the parent query, within which the returned query clause shall be employed), and the current table 'index'.
  _apply_function(self, fn, column)
  _ensure(self)
Ensure the the query has been executed.
  _execute(self)
Execute the query, generated by this object's 'get_query' method, and return the results in a form produced by this object's '_get_results' method.
  _get_columns(self, exposed_columns, index, limited_to)
Return a column selection for the 'exposed_columns' qualified by the given table 'index', optionally limited by the given 'limited_to' sequence of column definitions.
  _get_join_constraints(self, parent_columns, child_columns, parent_index, child_index)
  _get_table(self, index)
    Inherited from AbstractQuery
  _get_exposed_columns(self)

Class Variable Summary
    Inherited from AbstractQuery
list table_columns = [('subject', 'subject_type', 0), ('predi...

Method Details

get_query(self, index, constraints=None)

Return a query clause, associated values, and an updated table index (as
a 3-tuple) for this object's query defined using the given table 'index'
and the supplied, optional 'constraints' text.

get_subquery(self, parent_columns, parent_index, index, match_first=0, match_parent=0, match_child=0)

Make a subquery for this object using the given 'parent_columns'
(indicating the columns which connect with this object's exposed
columns), a 'parent_index' (indicating the table index used in the
parent query, within which the returned query clause shall be employed),
and the current table 'index'.

Return a query clause, associated values, and an updated table index (as
a 3-tuple).

_ensure(self)

Ensure the the query has been executed.

_execute(self)

Execute the query, generated by this object's 'get_query' method, and
return the results in a form produced by this object's '_get_results'
method.

_get_columns(self, exposed_columns, index, limited_to=None)

Return a column selection for the 'exposed_columns' qualified by the
given table 'index', optionally limited by the given 'limited_to'
sequence of column definitions. The following style of text is produced:

subject, subject_type, predicate, object, object_type, context

Generated by Epydoc 2.1 on Tue Sep 18 23:34:27 2007 http://epydoc.sf.net