minos.plugins.aiopg.factories.aggregate.transactions

Classes

AiopgTransactionDatabaseOperationFactory

Aiopg Transaction Database Operation Factory class.

class AiopgTransactionDatabaseOperationFactory[source]

Bases: TransactionDatabaseOperationFactory

Aiopg Transaction Database Operation Factory class.

build_table_name()[source]

Get the table name.

Returns

A str value.

Return type

str

build_create()[source]

Build the database operation to create the snapshot table.

Returns

A DatabaseOperation instance.

Return type

DatabaseOperation

build_submit(uuid, destination_uuid, status, event_offset, **kwargs)[source]

Build the database operation to submit a row.

Parameters
  • uuid (UUID) – The identifier of the transaction.

  • destination_uuid (UUID) – The identifier of the destination transaction.

  • status (TransactionStatus) – The status of the transaction.

  • event_offset (int) – The event offset of the transaction.

  • kwargs – Additional named arguments.

Returns

A DatabaseOperation instance.

Return type

DatabaseOperation

build_query(uuid=None, uuid_ne=None, uuid_in=None, destination_uuid=None, status=None, status_in=None, event_offset=None, event_offset_lt=None, event_offset_gt=None, event_offset_le=None, event_offset_ge=None, updated_at=None, updated_at_lt=None, updated_at_gt=None, updated_at_le=None, updated_at_ge=None, **kwargs)[source]

Build the database operation to select rows.

Parameters
  • uuid (Optional[UUID]) – Transaction identifier equal to the given value.

  • uuid_ne (Optional[UUID]) – Transaction identifier not equal to the given value

  • uuid_in (Optional[Iterable[UUID]]) – Transaction identifier within the given values.

  • destination_uuid (Optional[UUID]) – Destination Transaction identifier equal to the given value.

  • status (Optional[str]) – Transaction status equal to the given value.

  • status_in (Optional[Iterable[str]]) – Transaction status within the given values

  • event_offset (Optional[int]) – Event offset equal to the given value.

  • event_offset_lt (Optional[int]) – Event Offset lower than the given value

  • event_offset_gt (Optional[int]) – Event Offset greater than the given value

  • event_offset_le (Optional[int]) – Event Offset lower or equal to the given value

  • event_offset_ge (Optional[int]) – Event Offset greater or equal to the given value

  • updated_at (Optional[datetime]) – Updated at equal to the given value.

  • updated_at_lt (Optional[datetime]) – Updated at lower than the given value.

  • updated_at_gt (Optional[datetime]) – Updated at greater than the given value.

  • updated_at_le (Optional[datetime]) – Updated at lower or equal to the given value.

  • updated_at_ge (Optional[datetime]) – Updated at greater or equal to the given value.

  • kwargs – Additional named arguments.

Returns

A DatabaseOperation instance.

Return type

DatabaseOperation