View source on GitHub
|
An immutable filter predicate that combines other predicates.
Inherits From: FilterPredicate, expected_type
google.appengine.datastore.datastore_query.CompositeFilter(
op, filters
)
This class proactively merges sub-filters that are combined using the same operator. For example: CompositeFilter(AND, [f1, f2, CompositeFilter(AND, [f3, f4]), f5, f6]) is equivalent to: CompositeFilter(AND, [f1, f2, f3, f4, f5, f6])
Currently filters can only be combined using an AND operator.
Args | |
|---|---|
op
|
The operator to use to combine the given filters |
filters
|
A list of one or more filters to combine |
Raises | |
|---|---|
| datastore_errors.BadArgumentError if op is not in CompsiteFilter.OPERATORS or filters is not a non-empty list containing only FilterPredicates. |
Attributes | |
|---|---|
filters
|
|
op
|
|
Methods
__call__
__call__(
entity
)
Applies the filter predicate to the given entity.
| Args | |
|---|---|
entity
|
the datastore_pb.EntityProto to test. |
| Returns | |
|---|---|
| True if the given entity matches the filter, False otherwise. |
__eq__
__eq__(
other
)
Return self==value.
__ne__
__ne__(
other
)
Return self!=value.
Class Variables | |
|---|---|
| AND |
'and'
|
View source on GitHub