View source on GitHub |
A datastore index.
Inherits From: expected_type
google.appengine.api.datastore.Index(
index_id, kind, has_ancestor, properties
)
Args | |
---|---|
index_id
|
Required long; Uniquely identifies the index |
kind
|
Required string; Specifies the kind of the entities to index |
has_ancestor
|
Required boolean; indicates if the index supports a query that filters entities by the entity group parent |
properties
|
Required list of (string, int) tuples; The entity properties
to index. First item in a tuple is the property name and the second
item is the sorting direction (ASCENDING|DESCENDING).
The order of the properties is based on the order in the index.
|
Methods
HasAncestor
HasAncestor()
Indicates if this is an ancestor index, a boolean.
Id
Id()
Returns the index id, a long.
Kind
Kind()
Returns the index kind, a string. Empty string ('') if none.
Properties
Properties()
Returns the index properties. a tuple of
(index name as a string, [ASCENDING|DESCENDING])
tuples.
__eq__
__eq__(
other
)
Return self==value.
__ne__
__ne__(
other
)
Return self!=value.
Class Variables | |
---|---|
ASCENDING |
1
|
BUILDING |
0
|
DELETING |
2
|
DESCENDING |
2
|
ERROR |
3
|
SERVING |
1
|