App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Public Attributes | List of all members
google.appengine.ext.mapreduce.property_range.PropertyRange Class Reference
Inheritance diagram for google.appengine.ext.mapreduce.property_range.PropertyRange:

Public Member Functions

def __init__
 
def split
 
def make_query
 
def to_json
 
def from_json
 

Public Attributes

 filters
 
 model_class_path
 
 model_class
 
 end
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Member Function Documentation

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: