![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
def | __init__ |
def | Clear |
def | GetQueryCursor |
def | Get |
def | Put |
def | Delete |
def | Touch |
def | SetAutoIdPolicy |
def | Write |
![]() | |
def | __init__ |
def | SetConsistencyPolicy |
def | Clear |
def | BeginTransaction |
def | GetTxn |
def | Groom |
def | Flush |
![]() | |
def | __init__ |
def | CreateIndex |
def | GetIndexes |
def | UpdateIndex |
def | DeleteIndex |
Additional Inherited Members | |
![]() | |
WRITE_ONLY = entity_pb.CompositeIndex.WRITE_ONLY | |
READ_WRITE = entity_pb.CompositeIndex.READ_WRITE | |
DELETED = entity_pb.CompositeIndex.DELETED | |
ERROR = entity_pb.CompositeIndex.ERROR | |
A base implemenation of a Datastore. This class implements common functions associated with a datastore and enforces security restrictions passed on by a stub or client. It is designed to be shared by any number of threads or clients serving any number of apps. If an app is not specified explicitly it is pulled from the env and assumed to be untrusted.
def google.appengine.datastore.datastore_stub_util.BaseDatastore.Clear | ( | self | ) |
Clears out all stored values.
def google.appengine.datastore.datastore_stub_util.BaseDatastore.Delete | ( | self, | |
raw_keys, | |||
cost, | |||
transaction = None , |
|||
trusted = False , |
|||
calling_app = None |
|||
) |
Deletes the entities associated with the given keys. Args: raw_keys: A list of unverified entity_pb.Reference objects. cost: Out param. The cost of putting the provided entities. transaction: The datastore_pb.Transaction to use or None. trusted: If the calling app is trusted. calling_app: The app requesting the results or None to pull the app from the environment.
def google.appengine.datastore.datastore_stub_util.BaseDatastore.Get | ( | self, | |
raw_keys, | |||
transaction = None , |
|||
eventual_consistency = False , |
|||
trusted = False , |
|||
calling_app = None |
|||
) |
Get the entities for the given keys. Args: raw_keys: A list of unverified entity_pb.Reference objects. transaction: The datastore_pb.Transaction to use or None. eventual_consistency: If we should allow stale, potentially inconsistent results. trusted: If the calling app is trusted. calling_app: The app requesting the results or None to pull the app from the environment. Returns: A list containing the entity or None if no entity exists.
def google.appengine.datastore.datastore_stub_util.BaseDatastore.GetQueryCursor | ( | self, | |
raw_query, | |||
trusted = False , |
|||
calling_app = None |
|||
) |
Execute a query. Args: raw_query: The non-validated datastore_pb.Query to run. trusted: If the calling app is trusted. calling_app: The app requesting the results or None to pull the app from the environment. Returns: A BaseCursor that can be used to retrieve results.
def google.appengine.datastore.datastore_stub_util.BaseDatastore.Put | ( | self, | |
raw_entities, | |||
cost, | |||
transaction = None , |
|||
trusted = False , |
|||
calling_app = None |
|||
) |
Writes the given given entities. Updates an entity's key and entity_group in place if needed Args: raw_entities: A list of unverified entity_pb.EntityProto objects. cost: Out param. The cost of putting the provided entities. transaction: The datastore_pb.Transaction to use or None. trusted: If the calling app is trusted. calling_app: The app requesting the results or None to pull the app from the environment. Returns: A list of entity_pb.Reference objects that indicates where each entity was stored.
def google.appengine.datastore.datastore_stub_util.BaseDatastore.SetAutoIdPolicy | ( | self, | |
auto_id_policy | |||
) |
Set value of _auto_id_policy flag (default SEQUENTIAL). SEQUENTIAL auto ID assignment behavior will eventually be deprecated and the default will be SCATTERED. Args: auto_id_policy: string constant. Raises: TypeError: if auto_id_policy is not one of SEQUENTIAL or SCATTERED.
def google.appengine.datastore.datastore_stub_util.BaseDatastore.Touch | ( | self, | |
raw_keys, | |||
trusted = False , |
|||
calling_app = None |
|||
) |
Applies all outstanding writes.
def google.appengine.datastore.datastore_stub_util.BaseDatastore.Write | ( | self | ) |
Writes the datastore to disk.