minos.networks.brokers.collections.queues.database.factories

Classes

BrokerQueueDatabaseOperationFactory

Broker Queue Database Operation Factory class.

class BrokerQueueDatabaseOperationFactory[source]

Bases: DatabaseOperationFactory, ABC

Broker Queue Database Operation Factory class.

abstract build_create()[source]

Build the “create table” query.

Returns

A SQL instance.

Return type

DatabaseOperation

abstract build_mark_processed(id_)[source]

Build the “update not processed” query.

Returns

A SQL instance.

Parameters

id_ (int) –

Return type

DatabaseOperation

abstract build_delete(id_)[source]

Build the “delete processed” query.

Returns

A SQL instance.

Parameters

id_ (int) –

Return type

DatabaseOperation

abstract build_mark_processing(ids)[source]
Returns

A SQL instance.

Parameters

ids (Iterable[int]) –

Return type

DatabaseOperation

abstract build_count(retry, *args, **kwargs)[source]

Build the “count not processed” query.

Returns

Parameters

retry (int) –

Return type

DatabaseOperation

abstract build_submit(topic, data)[source]

Build the “insert” query.

Returns

A SQL instance.

Parameters
Return type

DatabaseOperation

abstract build_query(retry, records, *args, **kwargs)[source]

Build the “select not processed” query.

Returns

A SQL instance.

Parameters
  • retry (int) –

  • records (int) –

Return type

DatabaseOperation