Managers

class deker.managers.ArrayManager(collection, array_adapter)

Bases: SelfLoggerMixin, DataManager

Manager for Arrays.

Parameters
  • collection (Collection) –

  • array_adapter (BaseArrayAdapter) –

create(primary_attributes=None, custom_attributes=None, id_=None)

Create array in collection.

Parameters
  • primary_attributes (Optional[dict]) – Array primary attributes

  • custom_attributes (Optional[dict]) – Array custom attributes

  • id – Array unique UUID string

  • id_ (Optional[str]) –

Return type

Array

class deker.managers.DataManager(collection, array_adapter, varray_adapter=None)

Bases: BaseManager

Common data manager.

Its behavior depends on the type of Collection (Array/Varrary)

Parameters
  • collection (Collection) –

  • array_adapter (BaseArrayAdapter) –

  • varray_adapter (Optional[BaseVArrayAdapter]) –

create(primary_attributes=None, custom_attributes=None, id_=None)

Create array or varray.

Parameters
  • primary_attributes (Optional[dict]) – primary attributes

  • custom_attributes (Optional[dict]) – custom attributes

  • id – unique UUID string

  • id_ (Optional[str]) –

Return type

Union[Array, VArray]

class deker.managers.FilteredManager(collection, array_adapter, varray_adapter, schema, filters)

Bases: SelfLoggerMixin, BaseAbstractManager

Manager for Collection contents filtering.

Parameters
  • collection (Collection) –

  • array_adapter (BaseArrayAdapter) –

  • varray_adapter (BaseVArrayAdapter) –

  • schema (BaseArraysSchema) –

  • filters (dict) –

first()

Return first array in the filter.

Return type

Optional[Union[Array, VArray]]

last()

Return last array in the filter.

Return type

Optional[Union[Array, VArray]]

class deker.managers.VArrayManager(collection, array_adapter, varray_adapter)

Bases: SelfLoggerMixin, DataManager

Manager for VArrays.

Parameters
  • collection (Collection) –

  • array_adapter (BaseArrayAdapter) –

  • varray_adapter (BaseVArrayAdapter) –

create(primary_attributes=None, custom_attributes=None, id_=None)

Create varray in collection.

Parameters
  • primary_attributes (Optional[dict]) – VArray primary attributes

  • custom_attributes (Optional[dict]) – VArray custom attributes

  • id – VArray unique UUID string

  • id_ (Optional[str]) –

Return type

VArray