Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing outdated Transaction.succeeded docs. #784

Merged
merged 1 commit into from
Mar 31, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Removing outdated Transaction.succeeded docs.
Fixes #781.
  • Loading branch information
dhermes committed Mar 31, 2015
commit 7dcd4960d646342a19935eceea07eff7b64eff92
17 changes: 0 additions & 17 deletions gcloud/datastore/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,6 @@ class Transaction(Batch):
...
>>> assert not entity.key.is_partial # There *is* an ID.

After completion, you can determine if a commit succeeded or failed.
For example, trying to delete a key that doesn't exist::

>>> with datastore.Transaction() as xact:
... xact.delete(key)
...
>>> xact.succeeded
False

or successfully storing two entities:

>>> with datastore.Transaction() as xact:
... datastore.put([entity1, entity2])
...
>>> xact.succeeded
True

If you don't want to use the context manager you can initialize a
transaction manually::

Expand Down