App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Static Public Attributes | List of all members
google.appengine.datastore.datastore_stub_util.LiveTxn Class Reference
Inheritance diagram for google.appengine.datastore.datastore_stub_util.LiveTxn:

Public Member Functions

def __init__
 
def Get
 
def GetQueryCursor
 
def Put
 
def Delete
 
def AddActions
 
def Rollback
 
def Commit
 

Static Public Attributes

int ACTIVE = 1
 
int COMMITED = 2
 
int ROLLEDBACK = 3
 
int FAILED = 4
 

Detailed Description

An in flight transaction.

Member Function Documentation

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: