EntityStore

class app.portfolio.models.store.entity_store.EntityStore[source]

Bases: MutableMapping[Uid, Entity], LoggableHierarchicalMixin

Inheritance diagram of EntityStore

Inheritance Diagram for EntityStore

Methods

__init__(*args)

generate_next_uid(namespace, *[, increment])

get_entity_log(key)

get_entity_record(key)

get_entity_uids()

get_global_store()

get_global_store_or_none()

get_reachable_uids(roots, *[, use_journal])

get_string_uid_mapping(namespace)

get_unreachable_uids(roots, *[, use_journal])

reset()

update(value, /)

Attributes

__init__(*args: Entity | Mapping[Uid, Entity]) None[source]
Parameters:

args (Entity | Mapping[Uid, Entity])

Return type:

None

generate_next_uid(namespace: str, *, increment: bool = True) Uid[source]
Parameters:
Return type:

Uid

get_entity_log(key: Uid | Entity | EntityRecord) EntityLog | None[source]
Parameters:

key (Uid | Entity | EntityRecord)

Return type:

EntityLog | None

get_entity_record(key: Uid | Entity) EntityRecord | None[source]
Parameters:

key (Uid | Entity)

Return type:

EntityRecord | None

get_entity_uids() Set[Uid][source]
Return type:

Set[Uid]

static get_global_store() EntityStore[source]
Return type:

EntityStore

static get_global_store_or_none() EntityStore | None[source]
Return type:

EntityStore | None

get_reachable_uids(roots: Uid | Iterable[Uid], *, use_journal: bool = False) Set[Uid][source]
Parameters:
Return type:

Set[Uid]

get_string_uid_mapping(namespace: str) StringUidMapping[source]
Parameters:

namespace (str)

Return type:

StringUidMapping

get_unreachable_uids(roots: Uid | Iterable[Uid], *, use_journal: bool = False) Set[Uid][source]
Parameters:
Return type:

Set[Uid]

reset() None[source]
Return type:

None

update(value: Entity | Mapping[Uid, Entity], /) None[source]
Parameters:

value (Entity | Mapping[Uid, Entity])

Return type:

None