View source on GitHub |
A decorator that makes sure a function is run in a transaction.
google.appengine.api.datastore.Transactional(
_func=None, **kwargs
)
Defaults propagation to datastore_rpc.TransactionOptions.ALLOWED, which means any existing transaction will be used in place of creating a new one.
WARNING: Reading from the datastore while in a transaction will not see any changes made in the same transaction. If the function being decorated relies on seeing all changes made in the calling scoope, set propagation=datastore_rpc.TransactionOptions.NESTED.
Args | |
---|---|
_func
|
do not use. |
**kwargs
|
TransactionOptions configuration options.
|
Returns | |
---|---|
A wrapper for the given function that creates a new transaction if needed. |