def __init__(self, client, transaction_id='TRANSACTION'): from google.cloud.datastore.batch import Batch from google.cloud.datastore.transaction import Transaction self._client = client xact = self._transaction = Transaction(client) xact._id = transaction_id Batch.begin(xact)
def transaction(self, **kwargs): """Proxy to :class:`google.cloud.datastore.transaction.Transaction`. :type kwargs: dict :param kwargs: Keyword arguments to be passed in. """ return Transaction(self, **kwargs)
def transaction(self): """Proxy to :class:`google.cloud.datastore.transaction.Transaction`.""" return Transaction(self)