8000 Failing Pregel Doctest by apetenchea · Pull Request #332 · arangodb/python-arango · GitHub
[go: up one dir, main page]

Skip to content

Failing Pregel Doctest #332

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

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Changing the order of examples
  • Loading branch information
apetenchea committed Mar 12, 2024
commit 61b8e8d884534cc8380697fbf2037df66cd6c410
13 changes: 7 additions & 6 deletions docs/transaction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ logical unit of work (ACID compliant).
assert '_rev' in txn_col.insert({'_key': 'Lily'})
assert len(txn_col) == 6

# Abort the transaction
txn_db.abort_transaction()
assert 'Kate' not in col
assert 'Mike' not in col
assert 'Lily' not in col
assert len(col) == 3 # transaction is aborted so txn_col cannot be used

# Fetch an existing transaction. Useful if you have received a Transaction ID
# from some other part of your system or an external system.
original_txn = db.begin_transaction(write='students')
Expand All @@ -76,13 +83,7 @@ logical unit of work (ACID compliant).
txn_db = db.fetch_transaction(original_txn.transaction_id)
txn_col = txn_db.collection('students')
assert '_rev' in txn_col.insert({'_key': 'Alya'})

# Abort the transaction
txn_db.abort_transaction()
assert 'Kate' not in col
assert 'Mike' not in col
assert 'Lily' not in col
assert len(col) == 3 # transaction is aborted so txn_col cannot be used

See :ref:`TransactionDatabase` for API specification.

Expand Down
0