path
path
#
Path[T] — a typed position in a schema; the only non-storable composite.
A Path is an address, not data: it points at a value of type T
somewhere in a target schema. The procedure layer threads Path[T] through
access nodes (field, key, index) and a CacheProcedure stores a value at one.
It is non-storable: a Path is never a Struct field, a Map key, or
another Path's target. It may be an Array element or Map value —
Array[Path[V]] / Map[K, Path[V]] are fan-out collections of positions,
themselves non-storable.
Path.schema() carries the target (so two Path types compare structurally),
but a bare Path — or one parameterized by a still-unresolved TypeVar while
a generic node class is being defined — serializes compactly as {"type":
"path"}; the procedure graph relies on the embedded schema, not the per-node
target.
Path
#
Bases: CGType
A position in a schema pointing at a value of type T (Path[T]).
The type parameter types the fluent loaders (load()/load_or()
return Procedure[T]); the runtime target still travels via
__class_getitem__'s generated subclasses.
Source code in capturegraph-lib/capturegraph/types/special/path.py
__class_getitem__(target)
#
Build Path[target], carrying target for structural comparison.
Source code in capturegraph-lib/capturegraph/types/special/path.py
schema()
classmethod
#
This path's wire form: {"type": "path"}, plus target if resolved.