Skip to main content

relate_executor/
lib.rs

1// The sealed adjacency tier (ADR-0551): compressed chunks, versioned
2// tombstones, and the delta merge beside the live store.
3mod adjacency;
4mod catalog_meta;
5mod csv;
6mod ctx;
7// The one tiered distinct set under every DISTINCT site (LABS-852).
8mod distinct_set;
9#[cfg(test)]
10mod distinct_set_tests;
11mod effect;
12mod eval;
13// The eval-side pattern-walk engine (pattern comprehensions, pattern
14// predicates, expression shortest paths): a pattern-walk client like the
15// exec walkers, hoisted out of the eval tree so `eval` stays the
16// expression core strictly below `pattern_walk` — private module,
17// `pub(crate)` items, one public path per item at `crate::eval_walk::…`.
18mod eval_walk;
19mod exec;
20// The frontier rung's decline vocabulary (ADR-0478, ADR-0516): private
21// module, root re-exports only (one public path).
22mod frontier_decline;
23mod function_registry;
24mod graph;
25mod graph_type;
26mod graph_type_visualize;
27mod group_key;
28#[cfg(test)]
29mod group_key_tests;
30// The hasher seam: the Fx alias and the one process-wide seeded state.
31mod hash_seed;
32mod memory;
33mod overlay;
34mod props;
35// The pattern-walk vocabulary both walk engines share (LABS-668): private
36// module, `pub(crate)` items — nothing re-exported at the root.
37mod pattern_walk;
38// The diagnostic pattern-engine switch (ADR-0519): private module with a
39// root re-export only (one public path) — the store's service bundle
40// (`graph/services`) holds the field, the `relate` crate's open path
41// resolves the variable and installs it, and the kernel rungs read it
42// back through `Graph::pattern_engine`.
43mod pattern_engine;
44mod query_engine;
45// Private module with a root re-export only (one public path): internal
46// callers use `crate::procedure_gate::…`, external consumers use the root
47// re-export below.
48mod procedure_gate;
49mod workspace;
50// Private module with root re-exports only (one public path): internal
51// callers already use `crate::procedure_registry::…`, external consumers
52// use the root re-exports below.
53mod procedure_registry;
54mod pull_identity;
55mod redo;
56// The compact row schema (LABS-668's hoist, finished at the crate root):
57// private module, `pub`/`pub(crate)` items — every consumer, both walk
58// engines included, imports downward from `crate::row`, the one public
59// path per item.
60mod row;
61// The relationship-uniqueness set in its boundary form (LABS-1116, the
62// set-type migration LABS-822 deferred): the type threaded through every
63// used-set signature — `Matched`, the walk-entry and probe-predicate
64// parameters, the GPM state carry. Hoisted to the crate root beside
65// `row` (LABS-668's precedent): the workspace meter and both walk
66// engines import downward from here, no module importing up. Its hasher
67// policy (engine-generated ids, so the id policy) is `hash_seed`'s.
68pub(crate) type UsedSet = hash_seed::IdSet<relate_core::RelId>;
69mod shortest;
70mod show_catalog;
71mod spatial;
72mod store;
73#[cfg(test)]
74mod test_support;
75// The tiered word-set utility (ADR-0522): the tier mechanics ADR-0507
76// built for the distinct set — one key class's words, inline then
77// promoted — freed of DISTINCT semantics so raw-key consumers (the
78// label-union planner work) can hold it; `distinct_set` delegates its
79// word storage to it. Private module, `pub(crate)` items.
80mod tiered_set;
81#[cfg(test)]
82mod tiered_set_tests;
83// The stored vector-index option schema (stellar round 3, std-6): the
84// key table, the storable-metric narrowing, and the one parse the CREATE
85// validation and the stored read share — split from the similarity
86// kernels in `vector_similarity` so the two concerns stop sharing a file.
87mod vector_config;
88mod vector_similarity;
89
90pub use catalog_meta::{DeprecatedBy, DeprecationForm};
91pub use csv::CsvPolicy;
92pub use ctx::{
93    BatchCommit, ClauseMetricsRecord, FrontierCounters, KernelRung, PhaseTimes, PlanMetricsSink,
94    StartReason, StoreReads, WalkStart,
95};
96pub use effect::StatementEffect;
97pub use exec::bulk::{
98    analyze_bulk_write, BulkCursor, BulkTargets, BulkWrite, DEFAULT_BATCH_BUDGET,
99    DEFAULT_BATCH_THRESHOLD,
100};
101pub use exec::graph_stats::GraphStats;
102pub use exec::procedures::{check_explicit_arity, check_implicit_passing_mode};
103pub use exec::{
104    catalog_create_statements, ddl_notifications::ddl_notifications, execute, execute_read_at,
105    value_matches_proc_type, ExecRequest, QueryResult, ReadAdmission,
106};
107pub use frontier_decline::{FrontierDecline, FrontierDeclineReason, FrontierRunDecline};
108pub use function_registry::builtin_function_deprecation;
109pub use graph::constraint_keys::admission::{ConstraintAdmission, SlotPosition};
110pub use graph::{
111    CheckpointTheater, ContainsCount, DatabaseEntry, Graph, Procedure, QueryStats, SchemaSnapshot,
112    SnapshotPin,
113};
114// One public path (the graph module stays private): the whole-graph
115// index-rebuild count the facade's reopen tests read to pin the
116// empty-replay rebuild skip (LABS-1112). Test seam behind `test-hooks`,
117// never in a shipped build.
118#[cfg(feature = "test-hooks")]
119#[doc(hidden)]
120pub use graph::take_index_rebuilds;
121pub use query_engine::InMemoryQueryEngine;
122// Research-only (speed-of-light kernels), quarantined behind the
123// non-default `research` cargo feature (ADR-0476): the re-export (and the
124// modules themselves) compile only under that feature.
125#[cfg(feature = "research")]
126#[doc(hidden)]
127pub use graph::sol;
128// Research-only heap-census harness (same quarantine, ADR-0476): the
129// census example in relate-query-latency names `HeapCensus`; the nested
130// types are re-exported so every public census field has a public type.
131#[cfg(feature = "research")]
132#[doc(hidden)]
133pub use graph::census::{AdjacencyCensus, DeclaredCensus, HeapCensus};
134pub use graph_type::GraphTypeSpec;
135#[cfg(feature = "research")]
136#[doc(hidden)]
137pub use memory::ChainCensus;
138pub use overlay::{ExecGraph, WriteScratch};
139// The diagnostic switch's typed value (ADR-0519): re-exported for the
140// `relate` crate's open path (the resolver and the installer below),
141// the one public path — deliberately not advertised API beyond it.
142pub use pattern_engine::PatternEngine;
143// The ADR-0395 budget constant: workspace-internal (test-support's
144// single-sourced assertion reads it), deliberately not advertised API —
145// the budget is a fixed contract, not a knob (ADR-0395: "never ambient
146// configuration").
147#[doc(hidden)]
148pub use overlay::NESTED_EVAL_BUDGET;
149// The re-arrival rule's work budget (the ADR-0395 fixed-constant family,
150// ADR-0516): workspace-internal (the PROFILE fixtures calibrate the budget
151// fraction against it), deliberately not advertised API — a fixed
152// contract, not a knob.
153#[doc(hidden)]
154pub use ctx::REARRIVAL_WORK_BUDGET;
155// The ADR-0463 default per-allocation expression cap: workspace-internal
156// (tests and the engine-default resolver read it), deliberately not
157// advertised API. The operator knob lives on the open options, not here.
158#[doc(hidden)]
159pub use memory::EXPRESSION_BUDGET_BYTES;
160pub use procedure_gate::procedure_preview_feature;
161pub use procedure_registry::{
162    builtin_procedure_deprecation, builtin_procedure_signature, call_is_write,
163    is_ontology_procedure, is_ontology_store_op, is_ontology_write_procedure, is_void_procedure,
164    ProcSignature,
165};
166pub use redo::{
167    legacy_property_encoding, props_from_json, split_legacy_property_encoding, IndexDetailSpec,
168    IndexFacts, IndexKindSpec, OntologyOp, PullKind, RedoOp, MAX_ONTOLOGY_SPEC_BYTES,
169};
170#[doc(hidden)]
171pub use workspace::result_rows_bytes;