App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Static Public Attributes | List of all members
google.appengine.datastore.datastore_query.QueryOptions Class Reference
Inheritance diagram for google.appengine.datastore.datastore_query.QueryOptions:
google.appengine.datastore.datastore_query.FetchOptions google.appengine.datastore.datastore_rpc.Configuration google.appengine.datastore.datastore_rpc.BaseConfiguration

Public Member Functions

def keys_only
 
def projection
 
def limit
 
def prefetch_size
 
def start_cursor
 
def end_cursor
 
def hint
 
- Public Member Functions inherited from google.appengine.datastore.datastore_query.FetchOptions
def produce_cursors
 
def offset
 
def batch_size
 
- Public Member Functions inherited from google.appengine.datastore.datastore_rpc.Configuration
def deadline
 
def on_completion
 
def read_policy
 
def force_writes
 
def max_entity_groups_per_rpc
 
def max_allocate_ids_keys
 
def max_rpc_bytes
 
def max_get_keys
 
def max_put_entities
 
def max_delete_keys
 
- Public Member Functions inherited from google.appengine.datastore.datastore_rpc.BaseConfiguration
def __new__
 
def __eq__
 
def __ne__
 
def __hash__
 
def __repr__
 
def is_configuration
 
def merge
 
def __getstate__
 
def __setstate__
 

Static Public Attributes

 ORDER_FIRST = datastore_pb.Query.ORDER_FIRST
 
 ANCESTOR_FIRST = datastore_pb.Query.ANCESTOR_FIRST
 
 FILTER_FIRST = datastore_pb.Query.FILTER_FIRST
 
- Static Public Attributes inherited from google.appengine.datastore.datastore_rpc.Configuration
int STRONG_CONSISTENCY = 0
 
int EVENTUAL_CONSISTENCY = 1
 
int APPLY_ALL_JOBS_CONSISTENCY = 2
 
tuple ALL_READ_POLICIES
 

Detailed Description

An immutable class that contains all options for running a query.

This class contains options that control execution process (deadline,
batch_size, read_policy, etc) and what part of the query results are returned
(keys_only, projection, offset, limit, etc) Options that control the contents
of the query results are specified on the datastore_query.Query directly.

This class reserves the right to define configuration options of any name
except those that start with 'user_'. External subclasses should only define
function or variables with names that start with in 'user_'.

Options are set by passing keyword arguments to the constructor corresponding
to the configuration options defined below and in FetchOptions and
datastore_rpc.Configuration.

This object can be used as the default config for a datastore_rpc.Connection
but in that case some options will be ignored, see below for details.

Member Function Documentation

def google.appengine.datastore.datastore_query.QueryOptions.end_cursor (   value)
Cursor to use as an end position.

Ignored if present on datastore_rpc.Connection.config.

Raises:
  datastore_errors.BadArgumentError if value is not a Cursor.
def google.appengine.datastore.datastore_query.QueryOptions.hint (   value)
Hint on how the datastore should plan the query.

Raises:
  datastore_errors.BadArgumentError if value is not a known hint.
def google.appengine.datastore.datastore_query.QueryOptions.keys_only (   value)
If the query should only return keys.

Raises:
  datastore_errors.BadArgumentError if value is not a bool.
def google.appengine.datastore.datastore_query.QueryOptions.limit (   value)
Limit on the number of results to return.

Raises:
  datastore_errors.BadArgumentError if value is not an integer or is less
  than zero.
def google.appengine.datastore.datastore_query.QueryOptions.prefetch_size (   value)
Number of results to attempt to return on the initial request.

Raises:
  datastore_errors.BadArgumentError if value is not an integer or is not
  greater than zero.
def google.appengine.datastore.datastore_query.QueryOptions.projection (   value)
A list or tuple of property names to project.

If None, the entire entity is returned.

Specifying a projection:
- may change the index requirements for the given query;
- will cause a partial entity to be returned;
- will cause only entities that contain those properties to be returned;

A partial entities only contain the property name and value for properties
in the projection (meaning and multiple will not be set). They will also
only contain a single value for any multi-valued property. However, if a
multi-valued property is specified in the order, an inequality property, or
the projected properties, the entity will be returned multiple times. Once
for each unique combination of values.

However, projection queries are significantly faster than normal queries.

Raises:
  datastore_errors.BadArgumentError if value is empty or not a list or tuple
of strings.
def google.appengine.datastore.datastore_query.QueryOptions.start_cursor (   value)
Cursor to use a start position.

Ignored if present on datastore_rpc.Connection.config.

Raises:
  datastore_errors.BadArgumentError if value is not a Cursor.

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