Expand description
Core values, errors, and identifiers for Relate.
Re-exports§
pub use temporal::QueryClockGuard;pub use temporal::Temporal;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).
- file_
identity - Physical file identity for storage ownership (ADR-0097) and LOAD CSV open-then-verify (ADR-0108).
- integer_
args - The ADR-0175 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). - Node
- 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. - 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.
Enums§
- 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. - 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. - Namespace
- One of the three fixed namespaces of a store.
- Preview
Feature - A gated preview Cypher feature. The table order is the registry order; rows are never renumbered, only appended.
- 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.- FORMAT_
REQUIRES_ ONE_ OR_ TWO_ ARGUMENTS - The one spelling of
format()’s one-or-two-argument arity requirement, shared by the front-end check and the executor’s implementation. - 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_
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.- NULLIF_
REQUIRES_ TWO_ ARGUMENTS - The one spelling of
nullif()’s two-argument arity requirement: the front-end static-argument check and the executor’s implementation both state it from here, so the compile-time and runtime halves cannot drift (theFUNCTION_REQUIRES_ONE_ARGUMENTprecedent). - PREVIEW_
FEATURES - Every registered feature, registry order — the enumeration callers iterate instead of re-spelling the vocabulary.
- VECTOR_
ARITY vector()’s three-argument contract.- VECTOR_
REQUIRES_ THREE_ ARGUMENTS - The one spelling of
vector()’s three-argument arity requirement, shared by the front-end check and the executor’s implementation.
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). - 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. - 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. - 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. - 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 CIP-257 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. - 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. - 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. - 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. - 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. - 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. - 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.