access
access
#
Schema navigation nodes — the small, regular family that walks a Path.
Each node takes a source returning Path[...] and produces the position
one step deeper, computing the child type from the source's target schema.
GetRoot is the base of every path; LoadPath reads a value at a runtime
position (map/array enumeration). Storing a value at a path is
[CacheProcedure][] (in destination/cache).
These are deliberately trivial — one operation each — so a cross-platform runtime resolves a path by evaluating the chain step by step.
GetRoot
#
The root position of the target schema (Path[Schema]).
A target schema is required: every path is concretely typed, so there is
no untargeted root. The schema is consumed at construction — moved into the
return type and cleared — so GetRoot serializes compactly (the schema is
carried once at the top of the wire form, not per node).
Attributes:
| Name | Type | Description |
|---|---|---|
schema |
Setting[type] | None
|
The target |
Source code in capturegraph-lib/capturegraph/procedures/nodes/destination/access.py
__post_init__()
#
Consume schema into _return_type and clear the setting.
Source code in capturegraph-lib/capturegraph/procedures/nodes/destination/access.py
LoadPath
#
Read the value stored at a position, with a fallback for an empty one.
Reads Procedure[Path[T]] → Procedure[T], with an explicit fallback
for a position holding nothing.
Loading is explicit: the authoring surface builds this only through
path.load() / path.load_or(default) (an unassigned position used as a
value never lowers to a silent disk read). The read goes to disk regardless of
any value cached at the slot this run — it sees what was already present
before the run — so reading and then &=-overwriting the same slot is
acyclic by construction.
The default runs only on a definitive "nothing stored here" answer,
never while the value is still loading, so a slow remote read cannot be
mistaken for an absent one. The default NullProcedure produces no value,
which leaves an absent read pending — waiting on whatever will write the slot.
Attributes:
| Name | Type | Description |
|---|---|---|
source |
Procedure[Path]
|
The |
default |
Procedure[CGType] | None
|
The procedure whose value stands in when nothing is stored at
|
Source code in capturegraph-lib/capturegraph/procedures/nodes/destination/access.py
__post_init__()
#
Resolve default to a NullProcedure when omitted.
Source code in capturegraph-lib/capturegraph/procedures/nodes/destination/access.py
PathAppend
#
A fresh element slot at the end of an array (used by the loop).
Returns Path[E].
Attributes:
| Name | Type | Description |
|---|---|---|
source |
Procedure[Path]
|
The |
Source code in capturegraph-lib/capturegraph/procedures/nodes/destination/access.py
__post_init__()
#
Resolve _return_type to the source array's element type.
Source code in capturegraph-lib/capturegraph/procedures/nodes/destination/access.py
PathField
#
Descend into a named struct field. Returns Path[FieldType].
Attributes:
| Name | Type | Description |
|---|---|---|
source |
Procedure[Path]
|
The |
field |
Setting[str]
|
The field name to descend into. |
Source code in capturegraph-lib/capturegraph/procedures/nodes/destination/access.py
__post_init__()
#
Resolve _return_type to the source's named field type.
Source code in capturegraph-lib/capturegraph/procedures/nodes/destination/access.py
PathIndex
#
Index one array element (negative indexes from the end). Returns Path[E].
Attributes:
| Name | Type | Description |
|---|---|---|
source |
Procedure[Path]
|
The |
index |
Setting[int]
|
The integer position (e.g. |
Source code in capturegraph-lib/capturegraph/procedures/nodes/destination/access.py
__post_init__()
#
Resolve _return_type to the source array's element type.
Source code in capturegraph-lib/capturegraph/procedures/nodes/destination/access.py
PathKey
#
Select a map entry by a runtime key value. Returns Path[V].
Attributes:
| Name | Type | Description |
|---|---|---|
source |
Procedure[Path]
|
The |
key |
Procedure[CGType]
|
A procedure producing the key value (a keyable scalar matching the map's key type). |
Source code in capturegraph-lib/capturegraph/procedures/nodes/destination/access.py
__post_init__()
#
Resolve _return_type to the source map's element type.
Source code in capturegraph-lib/capturegraph/procedures/nodes/destination/access.py
PathKeys
#
Enumerate a map's keys. Returns Array[KeyScalar].
A value, since keys are read-only (index it with ArrayIndex to select
one).
Attributes:
| Name | Type | Description |
|---|---|---|
source |
Procedure[Path]
|
The |
Source code in capturegraph-lib/capturegraph/procedures/nodes/destination/access.py
__post_init__()
#
Resolve _return_type to an Array of the source map's key type.
Source code in capturegraph-lib/capturegraph/procedures/nodes/destination/access.py
PathValues
#
Enumerate a map's entry positions. Returns Array[Path[V]].
An array of positions to fan out over (or index with ArrayIndex to
select one, which stays navigable as Path[V]).
Attributes:
| Name | Type | Description |
|---|---|---|
source |
Procedure[Path]
|
The |
Source code in capturegraph-lib/capturegraph/procedures/nodes/destination/access.py
__post_init__()
#
Resolve _return_type to an Array of the source map's entry paths.
Source code in capturegraph-lib/capturegraph/procedures/nodes/destination/access.py
path_target(source)
#
The concrete type a Procedure[Path[T]] points at, i.e. T.
Raises:
| Type | Description |
|---|---|
TypeError
|
If the source's return type is not a |