View source on GitHub |
Computes the minimal composite index for this query.
google.appengine.datastore.datastore_index.MinimalCompositeIndexForQuery(
query, index_defs
)
Unlike datastore_index.CompositeIndexForQuery
, this function takes into
account indexes that already exist in the system.
Args | |
---|---|
query
|
The datastore_pb.Query to compute suggestions for.
|
index_defs
|
A list of datastore_index.Index objects that already exist.
|
Returns | |
---|---|
None if no index is needed, otherwise the minimal index in the form
(is_most_efficient, kind, ancestor, properties) . Where is_most_efficient
is a boolean denoting if the suggested index is the most efficient (i.e.,
the one returned by datastore_index.CompositeIndexForQuery ). kind and
ancestor are the same variables returned by
datastore_index.CompositeIndexForQuery . properties is a tuple consisting
of the prefix and postfix properties returend by
datastore_index.CompositeIndexForQuery .
|