Expand description
Core values, errors, and identifiers for Relate.
Re-exports§
pub use temporal::QueryClockGuard;pub use temporal::Temporal;pub use temporal::TransactionClock;pub use tokens::ExecutionReceipt;pub use tokens::TokenEstimate;pub use tokens::TokenOutcome;
Modules§
- ce_
messages - Neo4j Community Edition error texts for the fixed namespaces (ADR-0116 §2-§4, §9; ADR-0146).
- deadline
- The statement deadline (ADR-0692): a wall-clock budget enforced through
the
CancelToken(ADR-0111). - file_
identity - Physical file identity for storage ownership (ADR-0097) and LOAD CSV open-then-verify (ADR-0108).
- integer_
args - The integer-argument sites’ authored texts.
- temporal
- OpenCypher temporal values (ADR-0021).
- tokens
- Logical workspace charging. The logical workspace is the owned resident
memory a query holds, measured in logical bytes. The pool reserves that
memory in
CHARGE_QUANTUM_BYTESsteps, so every reservation and every receipt peak is a multiple of the quantum. Receipts report that peak and carry no schedule name. With no ledger installed, every charge is a no-op so admission can stay off.
Structs§
- Arity
Contract - One builtin’s compile-phase arity contract: the accepted argument-count range together with the authored rejection detail (bare, without the class token). Declared in the shared contract layer so the front-end check, the planner’s rule table and the executor’s dispatch read one fact instead of a count and a message each.
- Auto
Literal Guard - Installs
paramsfor the guard’s lifetime. A map with no$__AUTO_*__name installs nothing: a caller’s own parameters stay runtime-typed. - Cancel
Token - A cooperative cancellation flag shared between a query’s caller and the worker executing it (ADR-0111).
- Element
IdRef - The parsed shape of an element id (ADR-0116 §7):
<kind>:<segment>:<n|r><id>. This is the one parser for that three-part structure, shared byUSE graph.byElementId(...)resolution anddb.nameFromElementId; it only splits the shape — callers decide how much of it to validate (db.nameFromElementIdchecks the kind prefix and rejects an empty entity segment, but deliberately does not validate the entity segment’s contents). - Expansion
Memo - The logical size of each container payload a
logical_bytes_within_memowalk finished measuring, keyed by [depth::payload_key] (the identity ADR-0462’s depth memo uses). A payload’s size is its own contents’, independent of where it sits, so a hit adds the stored size; the depth guard is unreachable behind the checked constructors, so the memo ignores the level a payload was first met at.Defaultis the remembering memo, likeExpansionMemo::new; the memo-free form is private. - Load
Threads - How many load worker slots one open may use (always at least one).
- Node
- Open
Transient Tracker - Peak transient memory of one open: bytes currently leased and the high-water mark of that sum.
- Path
- Point
Value - Cypher point value with SRID and 2D/3D coordinates.
- Presence
Bits - One bit per logical slot, packed little-endian into
u64words. - Preview
Features - The set of preview features enabled by
RELATE_PREVIEWfor one open store. Empty (PreviewFeatures::none) disables every gated feature. - Preview
Sources - The preview opt-in’s resolved sources (ADR-0719 decision 3): the
three additive carriers, kept per-set so the resolved surface can
report which source enabled each feature. The union is derived —
never stored beside its parts — so the parts and the whole cannot
drift: every gate reads
Self::union, andSHOW SETTINGS(ADR-0719 decision 6) readsSelf::carriersfor the provenance it reports. - Property
Map - Sorted
(key, value)entries with capacity fitted to [reserved_slot_count]. - Relationship
- Tagged
Str - Borrowing encoder of the tagged string
{"t":"string","v":...}. Construct it withtagged_str.Value’s tagged encoder writes the same two entries. - Transient
Lease - Bytes charged to an open’s tracker until this guard drops. Inert when taken outside a load scope.
Enums§
- Argument
Fault - The per-site fault of a run-time argument rejection
(
Error::ArgumentValue): either one of the sites whose live GQLSTATUS is its own, orSelf::Generalfor the kind-carrying sites that keep the general one. Live Neo4j (2026.09/2026.10) reportspoint()’s in-map rejections under oneArgumentErrorclass but a code per rejection site; the classifier maps each variant to that code, so the code is data the site names, never recovered from the message text. The fault also fixes the detail token’sErrorKind(Self::kind), so the two cannot disagree, and the variant carries no second copy of it. - Arithmetic
Failure - The arithmetic failures the executor raises (ADR-0307), typed so a surface maps them without reading the message. Each renders exactly as the stringly error it replaced did.
- Capacity
Kind - Which capacity contract a
Error::Capacityrefusal belongs to (ADR-0042/ADR-0307 vs ADR-0463 vs ADR-0494). Public so a consumer can render the class without parsing the message; the Display already differs. - Detector
Kind - The front’s AST detector a detected feature is checked by, one variant per distinct detector. The front dispatches through one total
match. - Dynamic
Access Error - One rejected dynamic operand, carrying the data both error channels need
(the front renders it as an
EngineError(relate-error), the executor as aError).Displayis the authored detail text. - Dynamic
Name Token - Which token namespace a dynamic name belongs to (the
tokenTypeslot of Neo4j’s 42I11 “invalid name” status description). Owns the whole namespace vocabulary — the 42I11 token phrase, the 22N27/22NB1 operand position and accepted type — so neither layer spells any of them. - Error
- Error
Kind - The specific, TCK-aligned name of an engine error.
kind()returns the most specific name available; nested detail (e.g. theUnsupportedIndexOrConstraintin"SyntaxError: UnsupportedIndexOrConstraint: …") stays in the message. - Gate
Owner - Where a
GateSite’s gate is checked — the closed owner vocabulary each consumer matches once, so a new site names its consumer where the site is declared and no consumer re-lists the sites it does not own. The front owns the parse options, the AST detectors and the one graph-type walk; everything else belongs to a consumer outside the front (function admission, procedure dispatch, the namespace mapping, the capability-row producer, the evaluator, the open-time attach). - Gate
Site - Where in the pipeline a preview feature’s gate is checked, for the
sites whose consumers a test can read. A feature gated where this
vocabulary cannot name the site (statement validation, run-time
evaluation, the executor’s graph-type layer) declares
GateSite::GatedElsewhere; a row never declares no site. - Literal
Value Kind - The kinds a Cypher literal can spell — the one
Value→ literal-kind table. Exhaustive overValue, so a new variant makes its author state whether a literal can spell it. - Namespace
- One of the three fixed namespaces of a store.
- Parse
Option - The
ParseOptionsfield a parse-site feature switches on, one variant per option. The front applies each through one totalmatch. - Preview
Feature - A gated preview Cypher feature. The table order is the registry order; rows are never renumbered, only appended.
- Preview
Source - One of the preview opt-in’s three additive carriers (ADR-0719
decision 3) — the typed vocabulary of
PreviewSources. It carries no display text: each layer that names a carrier (a parse failure, theSHOW SETTINGSprovenance) spells it where that text belongs. - TckError
Class - One of the eight openCypher TCK error classes. The spec harness
(ADR-0482) asserts an expected class, while
ErrorKindcarries the finer-grained detail. EveryErrorKindmaps to exactly one class viaErrorKind::tck_class. - Value
- OpenCypher runtime value.
- Vector
Coord Kind - A vector coordinate type (CIP-216/CIP-200): the numeric types valid
inside
VECTOR<...>/VECTOR(...).Int64/Float64double as ordinary plain property types (aliases forINTEGER/FLOAT) outside a vector type; the others (Float16,BFloat16,Float32,Int8/Int16/Int32) are valid only as a vector coordinate type. Lives inrelate-model(rather than the parser, where it originated) so the runtimeCypherValue::Vectorvariant can carry it without a circular crate dependency – the parser re-exports this same type asrelate_parser::VectorCoordKind.
Constants§
- CHAR_
LENGTH_ ARITY char_length()/character_length()’s one-argument contract.- FORMAT_
ARITY format()’s one-or-two-argument contract.- FUNCTION_
REQUIRES_ ONE_ ARGUMENT - The one spelling of the one-argument arity requirement shared by the
planner’s
FIXED_ARITY_FUNCTIONSrow and the executor’s list-builtin backstop — the bare detail, without theInvalidNumberOfArgumentsclass token, which each layer composes exactly once (crate::Error::invalid_number_of_arguments, or the typed channel). - GRAPH_
SELECTOR_ FUNCTIONS - The composite-database
graph.*selector function names, lowercased (ADR-0116 §3). One shared list: the planner’suse_targetresolves these calls asUSEselectors (with element-id resolution forgraph.byElementId) and rejects them with CE’s 42N72 text in expression position, while the executor’sSHOW FUNCTIONScatalog lists them as catalog-only entries (discoverable but not executable). Two separate lists would drift. - GRAPH_
SELECTOR_ FUNCTION_ NAMES - The selector names, derived from
GRAPH_SELECTOR_FUNCTIONS— the one table — for consumers that need a flat&[&str](the executor’s catalog-onlySHOW FUNCTIONSentries). - LENGTH_
REQUIRES_ A_ PATH - The one spelling of
length()’s non-path argument rejection, shared by the planner’s static rules and the executor’s runtime backstop — the bare detail, without theInvalidArgumentTypeclass token, which each layer composes (theFUNCTION_REQUIRES_ONE_ARGUMENTprecedent). - MAX_
PLAN_ WIRE_ DEPTH - The deepest plan-wire nesting the crossing accepts (ADR-0628’s stack-safe budget, the security round’s final shape): 1 000 container levels — about 500 chained clauses (a plan node costs its map plus the children list around the next, ~2 levels per clause), ~2× headroom over ADR-0628’s own 251-clause repro (~502 levels). Past it a plan gets the typed refusal below — rare, loud, explained.
- MAX_
TRAVERSAL_ DEPTH - Hops an explicit traversal bound may ask for without opting in
(
--max-traversal-depth/RELATE_MAX_TRAVERSAL_DEPTH). - MAX_
TRAVERSAL_ DEPTH_ CEILING - The largest
--max-traversal-depthvalue an open accepts. Above this the recursive walker risks a stack overflow on small-stack platforms (WebAssembly’s 16 MiB stack is the tightest supported surface). - MAX_
VALUE_ DEPTH - The deepest container nesting a
Valuemay have (ADR-0462, LABS-606). - MAX_
WIRE_ MESSAGE_ BYTES - The byte bound of one wire message every surface frames around — the
value Bolt’s chunked framing caps a message at and the C ABI’s params
builder caps one
put_stringvalue at (single-sourced so the two surfaces can never disagree). Fixed constant, no knob (ADR-0514). - NEGATIVE_
PAGE_ BOUND_ DETAIL - The one negative-
SKIP/LIMITdetail, shared by the front end’s compile-time rule, the planner’s rule and the executor’s runtime guard: the layer that fires decides the class, never the wording. - NULLIF_
ARITY nullif()’s two-argument contract.- PREVIEW_
ENV_ VAR - The preview opt-in’s environment variable (ADR-0371) — the one spelling of its name: the open reads it, and its parse failure cites it.
- PREVIEW_
FEATURES - Every registered feature, registry order — the enumeration callers iterate instead of re-spelling the vocabulary.
- STORE_
CONFIG_ FILE - The store-committed config file’s one spelling (ADR-0719 decision 1:
no JSON twin, no second name) — the store-committed preview carrier’s
name, here beside the variable’s so every layer that names a carrier
(the storage reader, the
SHOW SETTINGSprovenance) reads one fact. - TOSTRING_
TYPE_ ERROR_ DETAIL - The authored detail the
toString()value-level type error carries after itsInvalidArgumentValue:token — one home for the executor’s refusal of the one kind with no string form (a byte array). - VECTOR_
ARITY vector()’s three-argument contract.
Functions§
- auto_
literal - The literal a plan-cache placeholder stands for, when one is installed.
Any other name, including a caller’s parameter, is
None. - bare_
type_ name value_type_namewithout the nullability suffix — the type spelling the 22N27/22NB1 dynamic-operand detail text renders (DATE,LIST<STRING | INTEGER>).- builtin_
arity - The arity contract shared across the front-end check, the planner’s rule
table and the executor’s dispatch, by lowercased builtin name.
Nonefor a name with no cross-layer contract (its arity, if any, is owned by one layer alone). - builtin_
returns_ list - Whether a builtin call’s declared return type is a list: the front’s
static boolean-position rule reads this one fact (names arrive
lower-cased — the same convention
crate::arity::builtin_arity’s callers apply). - bytes_
logical_ bytes - A byte payload’s documented logical size (ADR-0042): the 16-byte header
plus its bytes — the one spelling every payload-size site reads, beside
str_logical_bytesandValue::logical_bytes. - column_
type_ name - One canonical ADR-0224 type name for an engine
Value— the name spelling of [column_type_kind], for the engine’sQueryResult::column_typesstamp. - current_
load_ threads - The load thread count of the scope the calling thread is in; one outside any scope.
- cypher_
to_ value - duplicate_
variable_ detail - The one spelling of a duplicate-binding rejection’s detail (after the
VariableAlreadyBound:kind token):variable '<name>' already declared. - dynamic_
label_ names - The one dynamic label/type rule: the operand must be a
STRINGor aLIST<STRING>, and every name must be non-empty and NUL-free. - dynamic_
property_ key - The one dynamic property-key rule: the key must be a non-empty, NUL-free
STRING. - escape_
unsafe_ output - The one output-safety escape: characters the classification
(
is_unsafe_output_char) marks — controls, bidi and zero-width format marks — render throughchar::escape_default(\n,\u{1b}, …); every other character passes through unchanged, so the text stays recognizable. The storage layer’s untrusted-name rendering and the quoted message terms share this one loop. - expected_
type_ detail - The one spelling of the wrong-type sentence the 22N01 argument errors
and the SEARCH validators share. The expected set is the caller’s own
signature; the actual type name is the caller’s vocabulary
(
crate::value_type_name, or a SEARCH source-kind display name). - expected_
value_ type_ detail - The value-bearing form of
crate::expected_type_detail(22N01): the offending value renders as its Cypher literal, except the null literal, which Neo4j spellsNULLin this sentence, and the actual type isbare_type_name’s. The one spelling for a write’s bound node position and the read-side entity checks. - invalid_
argument_ text - A
CALL { … } IN TRANSACTIONSmodifier’s positive-integer sentence (crate::integer_args) under the pinnedInvalidArgumenttoken — the one composition the planner’s non-positive literal arms call (the SKIP/LIMIT shape: the token’s single home is here, the layer that fires decides only the class). - is_
graph_ selector_ function_ name - True for the composite-database
graph.*selector names (case-insensitive). The one predicate home — callers never spell the membership test themselves. Allocation-free: compares witheq_ignore_ascii_caselikeNamespace::parsedoes. - is_
unsafe_ output_ char - The single classification of characters that must never reach a human-facing
output surface raw: Unicode general-category
Cccontrols (C0, DEL, C1, viachar::is_control) andCfformat characters (bidi overrides such as U+202E RIGHT-TO-LEFT OVERRIDE, zero-width marks such as U+200B/U+200E, and U+FEFF), whichis_controldoes not cover but which reorder or hide printable text and can spoof a terminal. - is_
virtual_ id - Whether
idbelongs to a virtual entity — a graph-type projection synthesized with a negative id and carried by its value alone (it has no store entry). Persisted ids are non-negative (validate_persisted_id), so the sign is the one virtual-entity test. - list_
returning_ names - The table itself, for the executor registry’s drift test — the one
reader that pins this table to the signature registry’s
LIST<…>-returning rows (ADR-0715’s shared-fact contract). - logical_
bytes_ within - Whether the summed logical bytes (ADR-0042, as
Value::logical_bytes) ofvaluesstay withinlimit, orNoneonce the running total exceeds it. The one early-stopping logical-bytes walk (ADR-0341): the total stops being computed as soon as it exceedslimitinstead of walking every value. - logical_
bytes_ within_ memo logical_bytes_withinwith the container payloads it measures remembered inmemo(ADR-0691): a payload met again, under another row or wrapped by a fresh container, costs one lookup instead of a re-walk, so the work is linear in the distinct payloads. The sizes are keyed by allocation address: every value passed must stay alive whilememodoes (a freed allocation’s address may be reused), so a caller scopes one memo to values it holds for the call.- negative_
page_ bound_ text NEGATIVE_PAGE_BOUND_DETAILunder its pinnedNegativeIntegerArgumenttoken — the one composition both stringly layers use: the planner wraps it in the compile-timeSyntaxclass, the executor’s runtime guard in itsExecutionclass.- next_
depth - The next container level below
depth, orNoneonce that level would exceedMAX_VALUE_DEPTH. The canonical ADR-0462 guard for walkers that saturate or throw at the cap (renderers, JSON decoders/encoders, the model bridge, the logical-bytes walk); re-exported so the HTTP Query API encoder spells it the same way.depthis the number of containers enclosing the value, so a root is 0. - node_
element_ id - The element id string of a node in
namespace(4:<segment>:n<id>), built through the same validated namespace the parser accepts — an ad-hoc segment could emit an id the engine’s own parser refuses. - number_
out_ of_ range_ text - A modifier’s range sentence under the pinned
NumberOutOfRangetoken — the sibling ofinvalid_argument_textfor the sites whose plan-time rejection carries that token (the retry duration); the layer that fires decides only the class. - pack_
decoded_ values - Decode-side packing (ADR-0706): scalars a tagged/plain JSON decode
produced, validated per
coordkind and packed into the family buffer. The storage path fails closed on a crafted document (theVec<Value>decode this replaces accepted inconsistent coordinates and let the encoder reject them later); the lenientfrom_json_plainpath treats anErras an unrecognized shape. - parse_
expression_ memory_ limit - Parse the expression-memory-limit grammar:
parse_memory_limitplus the explicit opt-out spellingnone(case-insensitive), which maps to0= no cap.0is already unlimited inparse_memory_limit. - parse_
memory_ limit - Parse
--logical-graph-size-limit/RELATE_LOGICAL_GRAPH_SIZE_LIMITsizes. - parse_
node_ element_ id - The node id encoded in a relate element id, or
Nonefor a relationship id, a foreign namespace, or a malformed value. - parse_
positive_ memory_ limit parse_memory_limitfor a size that must be greater than zero.- parse_
rel_ element_ id - The relationship id encoded in a relate element id, or
None. - plan_
value_ to_ cypher - The plan-wire form of
value_to_cypher(ADR-0628): the identical mapping under the plan policy — not the ADR-0462 data-value cap (a plan tree is engine-produced metadata whose depth scales with the statement’s clause count, not a runtime data value that cap governs) butMAX_PLAN_WIRE_DEPTH, the walk-sized budget above. The one conversion every plan-path crossing routes through — the wire envelope’s plan document, the formatter’s plan-wire composition, the HTTP Query API v2 plan field — never a per-surface re-derivation. Iterative: the crossing holds constant stack on any caller’s thread. - point_
component - One component accessor of a point (
p.x,p.longitude,p.crs, …) — the one point-accessor vocabulary, the data-model sibling of the temporal accessor (crate::temporal::Temporal::component): a key no component names is the same typed rejection the temporal reader answers, never a silently null read. The coordinate aliases (xislongitude) are the shared axis vocabulary besidePointValue. - preview_
feature_ disabled_ text - The authored fail-closed gate text for a preview feature invoked while
disabled, already prefixed with its
SemanticErrorclass — the single source of the gate message.PreviewFeatures::requirewraps it in anError; layers outside this crate (the executor’s graph-type semantic layer, which fails closed on the same constructs its statement-admission gate already checked when they only materialize against stored graph-type state) render it through their own error type without re-spelling it. - quote_
message - The input as a single-quoted message term: the frame’s own two
escapes (
'and\) applied first, thenescape_unsafe_output’s one escape over the whole body — the frame’s escapes produce only printable characters, so the one escape leaves them intact — wrapped in the frame. Printable text passes through unchanged, so the term still spells what the user wrote. - record_
transient_ lease - Charge
bytesof transient memory to the tracker of the load scope the calling thread is in (load workers inherit their caller’s scope). - rel_
element_ id - The element id string of a relationship in
namespace(5:<segment>:r<id>). - require_
positive_ memory_ limit - Reject
0for a size that turns a feature on. - require_
traversal_ depth - Validate a caller-supplied traversal depth.
nameis the flag or variable the caller read it from, so the error is self-explaining. - resolve_
load_ threads - Resolve the load thread count: an explicit
load_threadswins, thenRELATE_LOAD_THREADS, then the machine’s available parallelism. Zero, negative, non-integer and non-UTF-8 values are rejected; an unset or blank environment variable counts as absent. - run_
load_ tasks - Run
tasksand return their results in order. Inside a load scope with more than one thread the tasks run on the pool’s slots (taskion sloti % min(k, tasks)); otherwise, and for calls made from a load worker, they run inline on the calling thread. The tasks may borrow from the caller’s stack: this returns only once every task has finished. A task’s panic is resumed on the caller after the rest have finished. - str_
logical_ bytes - A string’s documented logical size (ADR-0042): the 16-byte header
plus its UTF-8 bytes — the one spelling every string-size sum reads
(row keys, node and relationship property keys), beside
Value::logical_bytes. - tagged_
str - The tagged string [
TaggedRef] writes forValue::String. - traversal_
depth_ exceeded_ message - The user-facing rejection for a query whose explicit hop bound asks for
more than the admission limit. The wording states what the limit
protects, that it is not a database limit, and how far it can be
raised (
ceiling,MAX_TRAVERSAL_DEPTH_CEILING). - undefined_
variable_ detail - The one spelling of an undefined-variable rejection’s detail (after the
UndefinedVariable:kind token):variable '<name>' not defined. Both error channels — the typedrelate_error::EngineErrorand the executor’s string-carryingcrate::Error— render the same text. - uniqueness_
violation_ detail - The bare
ConstraintValidationFaileddetail of a uniqueness violation —Error::UniquenessViolation’s Display without thesemantic error:prefix, for error composition that embeds the violation’s message. - unknown_
function_ detail - The one spelling of an unknown-function rejection’s detail (after the
UnknownFunction:kind token):unknown function <name>(). The planner’s binder, the executor’s scalar-eval backstop and the front’s preview-name admission gate all render this text, so a gated name is rejected exactly like a name the registry has never known. - uuid_
hyphenated - Render a 128-bit UUID value as the canonical lowercase hyphenated string (8-4-4-4-12, CIP-246 / RFC 4122).
- uuid_
parse - Parse an RFC-4122-shaped UUID string (case-insensitive, hyphens
required, 8-4-4-4-12 groups) into its 128-bit value.
Noneon any non-conforming input, mirroring Java’sUUID.fromStringstrictness (CIP-246). - validate_
persisted_ id - The single acceptance rule for a persisted local node or relationship ID.
- value_
depth_ exceeded - The one
ValueDepthExceededdetail payload (ADR-0462), besideMAX_VALUE_DEPTH.whatnames the value shape the walker rejected ("value","tagged value","coll.flatten() input"). Every raiser —Value::check_depth, the tagged decoder and encoder, the collection helpers — spells the message through here so the detail and the limit cannot drift. - value_
to_ cypher - value_
type_ name - The Cypher type name of
value, including theNOT NULLsuffix thevalueType()surface renders. The literal vocabulary’s names come from the one literal-kind table (LiteralValueKind::name), so the static rules’ rejection details and this surface can never diverge. - with_
load_ scope - Run
fas one open’s load phase: tasks it fans out throughrun_load_tasksuse at mostthreadspool slots and charge their transient leases totracker.