Expand description
The model’s JSON answers → PackStream, and the client’s PackStream parameters → JSON.
Model → wire. A record value is plain JSON: strings, numbers, booleans, null, arrays and objects become PackStream strings, integers or floats, booleans, null, lists and maps. Three single-key objects are graph values instead, so a client renders them as nodes, relationships and paths rather than as maps:
{"$node": {"id": 1, "labels": ["Person"], "properties": {"name": "Alice"}}}
{"$relationship": {"id": 7, "type": "KNOWS", "start": 1, "end": 2, "properties": {}}}
{"$path": {"nodes": [{"id": 1, "labels": ["Person"]}, {"id": 2, "labels": ["Person"]}],
"relationships": [{"id": 7, "type": "KNOWS", "start": 1, "end": 2}]}}element_id (and a relationship’s start_element_id / end_element_id) may be given; each
defaults to the decimal string of the matching integer id. A path’s relationships[i] must
connect nodes[i] and nodes[i + 1] in either direction, and NetGet computes the Bolt path
index sequence (1-based relationship index, negative when traversed backwards; 0-based node
index) itself. Temporal and spatial values are not in the set — give them as strings.
Client → model. RUN’s parameters arrive as PackStream and reach the model as JSON. Bytes
become {"$bytes_length": n} (never the bytes: the event-design rule) and any structure
becomes {"$structure": "<name>", "fields": [...]} using Bolt’s structure names.
Both directions are bounded to MAX_PACKSTREAM_DEPTH, so NetGet never emits a value its own
decoder would refuse.
Structs§
- Query
Answer - A validated answer to one query: column names, rows, and the summary it ends with.
Constants§
- MAX_
ACTION_ DEPTH - Preflight handler values before recursive copies or conversion. The JSON action envelope and graph wrappers need four additional levels beyond wire containers.
- MAX_
ACTION_ NODES - MAX_
ACTION_ RETAINED_ BYTES - STAT_
COUNTERS - Query statistics Bolt reports in a result summary, as Neo4j names them on the wire.
- TAG_
NODE - Bolt structure tags for the graph types.
- TAG_
PATH - TAG_
RELATIONSHIP - TAG_
UNBOUND_ RELATIONSHIP
Functions§
- action_
within_ budget - json_
to_ value - Convert a JSON value the model wrote into a PackStream value.
- query_
answer - Build a
QueryAnswerfrom asend_bolt_recordsaction, refusing anything a client would misread: a record whose width differs fromfields, a duplicate or empty column name, an unknownquery_typeor statistic. - stats_
value - The model’s
statsobject (nodes_createdornodes-created, integer counts) → Bolt’sstatsmap, withcontains-updates/contains-system-updatesderived. Unknown keys and negative counts are refused. - structure_
name - Bolt’s name for a structure tag, for describing parameters to the model.
- valid_
failure_ code - A Neo4j status code the model may send in a FAILURE:
Neo.<Classification>.<Category>.<Title>with the classification one of ClientError, TransientError or DatabaseError. - value_
to_ json - A decoded PackStream value as JSON for an event. Never carries raw bytes.