|
int | ACTIVE = 1 |
|
int | COMMITED = 2 |
|
int | ROLLEDBACK = 3 |
|
int | FAILED = 4 |
|
An in flight transaction.
def google.appengine.datastore.datastore_stub_util.LiveTxn.AddActions |
( |
|
self, |
|
|
|
actions, |
|
|
|
max_actions = None |
|
) |
| |
Adds the given actions to the current txn.
Args:
actions: A list of pbs to send to taskqueue.Add when the txn is applied.
max_actions: A number that indicates the maximum number of actions to
allow on this txn.
def google.appengine.datastore.datastore_stub_util.LiveTxn.Commit |
( |
|
self | ) |
|
Commits the current txn.
This function hands off the responsibility of calling _Apply to the owning
TransactionManager.
Returns:
The cost of the transaction.
def google.appengine.datastore.datastore_stub_util.LiveTxn.Delete |
( |
|
self, |
|
|
|
reference, |
|
|
|
indexes |
|
) |
| |
Deletes the entity associated with the given reference.
Args:
reference: The entity_pb.Reference of the entity to delete.
indexes: The composite indexes that apply to the entity.
def google.appengine.datastore.datastore_stub_util.LiveTxn.Get |
( |
|
self, |
|
|
|
reference |
|
) |
| |
Returns the entity associated with the given entity_pb.Reference or None.
Does not see any modifications in the current txn.
Args:
reference: The entity_pb.Reference of the entity to look up.
Returns:
The associated entity_pb.EntityProto or None if no such entity exists.
def google.appengine.datastore.datastore_stub_util.LiveTxn.GetQueryCursor |
( |
|
self, |
|
|
|
query, |
|
|
|
filters, |
|
|
|
orders, |
|
|
|
index_list |
|
) |
| |
Runs the given datastore_pb.Query and returns a QueryCursor for it.
Does not see any modifications in the current txn.
Args:
query: The datastore_pb.Query to run.
filters: A list of filters that override the ones found on query.
orders: A list of orders that override the ones found on query.
index_list: A list of indexes used by the query.
Returns:
A BaseCursor that can be used to fetch query results.
def google.appengine.datastore.datastore_stub_util.LiveTxn.Put |
( |
|
self, |
|
|
|
entity, |
|
|
|
insert, |
|
|
|
indexes |
|
) |
| |
Puts the given entity.
Args:
entity: The entity_pb.EntityProto to put.
insert: A boolean that indicates if we should fail if the entity already
exists.
indexes: The composite indexes that apply to the entity.
def google.appengine.datastore.datastore_stub_util.LiveTxn.Rollback |
( |
|
self | ) |
|
Rollback the current txn.
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/datastore/datastore_stub_util.py