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

Class Predicates

  Results --+    
            |    
SingleResults --+
                |
               Predicates


A class representing a selection of predicates.
Method Summary
  get_query(self, index, constraints)
Produce for 'index' something like this:
  get_subquery(self, parent_index, index)
Produce for 'index' something like this: exists (select ...
    Inherited from SingleResults
  _execute(self)
    Inherited from Results
  __init__(self, store, pattern, fn, ordering, limit)
Initialise the results object with the given 'store', 'pattern', optional 'ordering' description and optional 'limit' criteria.
  __getitem__(self, i)
  __len__(self)
  __repr__(self)
  get_child_query(self, index)
Obtain the query clause and values (as a 2-tuple) which links this object's query to a parent query.
  _apply_function(self, fn, column)
  _ensure(self)
  _get_order_column(self, index)
  _get_order_extent(self)
  _get_query(self, select_clause, index, constraints)
Build the query conditions and return a usable query which starts with the supplied 'select_clause' and which uses the given table 'index' number as qualifier.

Method Details

get_query(self, index, constraints=None)

Produce for 'index' something like this:

select ... from triples as triples_i0 where ...

get_subquery(self, parent_index, index)

Produce for 'index' something like this:

exists (select ... from triples as triples_i1 where ...
        and triples_i0.predicate = triples_i1.predicate ...)

Generated by Epydoc 2.1 on Tue Mar 21 02:02:07 2006 http://epydoc.sf.net