App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | List of all members
google.appengine.datastore.datastore_query.CorrelationFilter Class Reference
Inheritance diagram for google.appengine.datastore.datastore_query.CorrelationFilter:
google.appengine.datastore.datastore_query.FilterPredicate google.appengine.datastore.datastore_query._PropertyComponent google.appengine.datastore.datastore_query._BaseComponent

Public Member Functions

def __init__
 
def subfilter
 
def __repr__
 
- Public Member Functions inherited from google.appengine.datastore.datastore_query.FilterPredicate
def __call__
 
- Public Member Functions inherited from google.appengine.datastore.datastore_query._BaseComponent
def __eq__
 
def __ne__
 

Detailed Description

A filter that isolates correlated values and applies a sub-filter on them.

This filter assumes that every property used by the sub-filter should be
grouped before being passed to the sub-filter. The default grouping puts
each value in its own group. Consider:
  e = {a: [1, 2], b: [2, 1, 3], c: 4}

A correlation filter with a sub-filter that operates on (a, b) will be tested
against the following 3 sets of values:
  {a: 1, b: 2}
  {a: 2, b: 1}
  {b: 3}

In this case CorrelationFilter('a = 2 AND b = 2') won't match this entity but
CorrelationFilter('a = 2 AND b = 1') will. To apply an uncorrelated filter on
c, the filter must be applied in parallel to the correlation filter. For
example:
  CompositeFilter(AND, [CorrelationFilter('a = 2 AND b = 1'), 'c = 3'])

If 'c = 3' was included in the correlation filter, c would be grouped as well.
This would result in the following values:
  {a: 1, b: 2, c: 3}
  {a: 2, b: 1}
  {b: 3}

If any set of correlated values match the sub-filter then the entity matches
the correlation filter.

Constructor & Destructor Documentation

def google.appengine.datastore.datastore_query.CorrelationFilter.__init__ (   self,
  subfilter 
)
Constructor.

Args:
  subfilter: A FilterPredicate to apply to the correlated values

The documentation for this class was generated from the following file: