|
| filters |
|
| model_class_path |
|
| model_class |
|
| end |
|
A class that represents a range on a db.Model's property.
It supports splitting the range into n shards and generating a query that
returns entities within that range.
def google.appengine.ext.mapreduce.property_range.PropertyRange.__init__ |
( |
|
self, |
|
|
|
filters, |
|
|
|
model_class_path |
|
) |
| |
Init.
Args:
filters: user supplied filters. Each filter should be a list or tuple of
format (<property_name_as_str>, <query_operator_as_str>,
<value_of_certain_type>). Value type should satisfy the property's type.
model_class_path: full path to the model class in str.
def google.appengine.ext.mapreduce.property_range.PropertyRange.make_query |
( |
|
self, |
|
|
|
ns |
|
) |
| |
Make a query of entities within this range.
Query options are not supported. They should be specified when the query
is run.
Args:
ns: namespace of this query.
Returns:
a db.Query or ndb.Query, depends on the model class's type.
def google.appengine.ext.mapreduce.property_range.PropertyRange.split |
( |
|
self, |
|
|
|
n |
|
) |
| |
Evenly split this range into contiguous, non overlapping subranges.
Args:
n: number of splits.
Returns:
a list of contiguous, non overlapping sub PropertyRanges. Maybe less than
n when not enough subranges.
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/ext/mapreduce/property_range.py