relstorage.adapters.txncontrol – TransactionControl implementations#

TransactionControl implementations

class AbstractTransactionControl(connmanager)[source]#

Bases: ABC

Abstract base class

abort(store_connection, txn=None)[source]#

Abort the commit. If txn is not None, phase 1 is also aborted.

The connection is rolled back quietly using rollback_quietly() and the boolean result of that function is returned.

abstract add_transaction(cursor, tid, username, description, extension, packed=False)[source]#

Add a transaction

abstract get_tid(cursor)[source]#

Returns the most recent tid

class GenericTransactionControl(connmanager, poller, keep_history, Binary)[source]#

Bases: AbstractTransactionControl

A ITransactionControl implementation that works for history-free and history-preserving storages that share a common syntax.

add_transaction(cursor, tid, username, description, extension, packed=False)[source]#

Add a transaction

get_tid(cursor)[source]#

Returns the most recent tid