google.appengine.datastore.datastore_query.Query

An immutable class that represents a query signature.

Inherits From: expected_type

A query signature consists of a source of entities (specified as app, namespace and optionally kind and ancestor) as well as a FilterPredicate, grouping and a desired ordering.

app Optional app to query, derived from the environment if not specified.
namespace Optional namespace to query, derived from the environment if not specified.
kind Optional kind to query.
ancestor Optional ancestor to query, an entity_pb2.Reference.
filter_predicate Optional FilterPredicate by which to restrict the query.
group_by Optional list of properties to group the results by.
order Optional Order in which to return results.
read_time_us Optional timestamp to read the storage from. Internal use only.

datastore_errors.BadArgumentError if any argument is invalid.

ancestor

app

filter_predicate

group_by

kind

namespace

order

read_time_us

Methods

run

View source

Runs the query using provided datastore_rpc.Connection.

Args
conn The datastore_rpc.Connection to use
query_options Optional query options to use

Returns
A Batcher that implicitly fetches query results asynchronously.

Raises
datastore_errors.BadArgumentError if any of the arguments are invalid.

run_async

View source

Runs the query using the provided datastore_rpc.Connection.

Args
conn the datastore_rpc.Connection on which to run the query.
query_options Optional QueryOptions with which to run the query.

Returns
An async object that can be used to grab the first Batch. Additional batches can be retrieved by calling Batch.next_batch/next_batch_async.

Raises
datastore_errors.BadArgumentError if any of the arguments are invalid.

__eq__

View source

Return self==value.

__ne__

View source

Return self!=value.