relstorage.adapters.interfaces – Interfaces provided by RelStorage database adapters

Interfaces provided by RelStorage database adapters

exception AggregateOperationTimeoutError[source]

Bases: Exception

Raised when an aggregate operation in RelStorage detects that it has exceeded a specified timeout.

partial_result = <object object>

If the function knows a useful, partial result, it may set this attribute. Check it against the class value to see if it’s been set.

exception DriverNotAvailableError(driver_name, driver_options=None, reason=None)[source]

Bases: Exception

Raised when a requested driver isn’t available.

driver_name = None

The name of the requested driver

driver_options = None

The IDBDriverOptions that was asked for the driver.

reason = None

The underlying reason string, for example, from an import error if such is available. This can be an arbitrary object; if it is not None, its str() value is included in our own.

exception NoDriversAvailableError(driver_name='auto', driver_options=None, reason=None)[source]

Bases: DriverNotAvailableError

Raised when there are no drivers available.

exception ReplicaClosedException[source]

Bases: Exception

The connection to the replica has been closed

exception StaleConnectionError(message=None, object=None, serials=None, **kw)[source]

Bases: ReadConflictError

Raised by IPoller.poll_invalidations when a stale connection is detected.

exception UnableToAcquireCommitLockError[source]

Bases: StorageError, UnableToAcquireLockError

The commit lock cannot be acquired due to a timeout.

This means some other transaction had the lock we needed. Retrying the transaction may succeed.

However, for historical reasons, this exception is not a TransientError.

exception UnableToAcquireLockError[source]

Bases: Exception

A lock cannot be acquired.

exception UnableToAcquirePackUndoLockError[source]

Bases: StorageError, UnableToAcquireLockError

A pack or undo operation is in progress.

exception UnableToLockRowsDeadlockError(message=None, object=None, oid=None, serials=None, data=None)[source]

Bases: ConflictError, UnableToAcquireLockError

The root class for a lock error because there was a deadlock.

exception UnableToLockRowsToModifyDeadlockError(message=None, object=None, oid=None, serials=None, data=None)[source]

Bases: UnableToLockRowsToModifyError, UnableToLockRowsDeadlockError

exception UnableToLockRowsToModifyError(message=None, object=None, oid=None, serials=None, data=None)[source]

Bases: ConflictError, UnableToAcquireLockError

We were unable to lock one or more rows that we intend to modify due to a timeout.

This means another transaction already had the rows locked, and thus we are in conflict with that transaction. Retrying the transaction may succeed.

This is a type of ConflictError, which is a transient error.

DEADLOCK_VARIANT

alias of UnableToLockRowsToModifyDeadlockError

exception UnableToLockRowsToReadCurrentDeadlockError(message=None, object=None, serials=None, **kw)[source]

Bases: UnableToLockRowsToReadCurrentError, UnableToLockRowsDeadlockError

exception UnableToLockRowsToReadCurrentError(message=None, object=None, serials=None, **kw)[source]

Bases: ReadConflictError, UnableToAcquireLockError

We were unable to lock one or more rows that belong to an object that Connection.readCurrent() was called on.

This means another transaction already had the rows locked with intent to modify them, and thus we are in conflict with that transaction. Retrying the transaction may succeed.

This is a type of ReadConflictError, which is a transient error.

DEADLOCK_VARIANT

alias of UnableToLockRowsToReadCurrentDeadlockError

exception UnknownDriverError(driver_name, driver_options=None, reason=None)[source]

Bases: DriverNotAvailableError

Raised when a driver that isn’t registered at all is requested.