graflo.architecture.evolution.aspects.access.plan¶
Planning the access aspect: a reserved access_zones field on named types.
Each vertex type and edge relation is labelled with a merge mode for its
zones: replace (an upsert sets them) or union (an upsert keeps every
zone stored and written).
Attributes¶
ACCESS_ZONES = 'access_zones'
module-attribute
¶
__all__ = ['ACCESS_ZONES', 'access_field', 'plan_access']
module-attribute
¶
Classes¶
Functions:¶
access_field(merge='replace')
¶
access_zones: a reserved list of zone ids, set by the writer's stamp.
Source code in graflo/architecture/evolution/aspects/access/plan.py
plan_access(manifest, *, vertices, edges)
¶
The ops that label vertices and edges with access_zones.
A type that already declares the field keeps it when it is the same field;
one declared with another type or merge mode is a contradiction
(:func:~graflo.architecture.evolution.aspects.join.join).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manifest
|
GraphManifest
|
the manifest to lift, already |
required |
vertices
|
Mapping[str, FieldMerge]
|
vertex type -> merge mode of its zones. |
required |
edges
|
Mapping[str, FieldMerge]
|
edge relation -> merge mode of its zones. |
required |
Raises:
| Type | Description |
|---|---|
LiftError
|
nothing to label, a type or relation the manifest does not have, or a field that contradicts the aspect's. |