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;
5// The terminal batch consumer (ADR-0682): private module, root re-exports
6// only (one public path).
7mod consumer;
8mod csv;
9mod ctx;
10mod metrics;
11mod recency;
12// The one tiered distinct set under every DISTINCT site (LABS-852).
13mod distinct_set;
14#[cfg(test)]
15mod distinct_set_tests;
16mod effect;
17mod eval;
18// The eval-side pattern-walk engine (pattern comprehensions, pattern
19// predicates, expression shortest paths): a pattern-walk client like the
20// exec walkers, hoisted out of the eval tree so `eval` stays the
21// expression core strictly below `pattern_walk` — private module,
22// `pub(crate)` items, one public path per item at `crate::eval_walk::…`.
23mod eval_walk;
24mod exec;
25// The frontier rung's decline vocabulary (ADR-0478, ADR-0516): private
26// module, root re-exports only (one public path).
27mod frontier_decline;
28mod function_registry;
29mod graph;
30mod graph_type;
31mod graph_type_visualize;
32mod group_key;
33#[cfg(test)]
34mod group_key_tests;
35// The hasher seam: the Fx alias and the one process-wide seeded state.
36mod hash_seed;
37mod memory;
38mod overlay;
39mod props;
40// The pattern-walk vocabulary both walk engines share (LABS-668): private
41// module, `pub(crate)` items — nothing re-exported at the root.
42mod pattern_walk;
43// The diagnostic pattern-engine switch (ADR-0519): private module with a
44// root re-export only (one public path) — the store's service bundle
45// (`graph/services`) holds the field, the `relate` crate's open path
46// resolves the variable and installs it, and the kernel rungs read it
47// back through `Graph::pattern_engine`.
48mod pattern_engine;
49mod query_engine;
50// Private module with a root re-export only (one public path): internal
51// callers use `crate::procedure_gate::…`, external consumers use the root
52// re-export below.
53mod procedure_gate;
54mod workspace;
55// Private module with root re-exports only (one public path): internal
56// callers already use `crate::procedure_registry::…`, external consumers
57// use the root re-exports below.
58mod procedure_registry;
59mod pull_identity;
60mod redo;
61// The compact row schema (LABS-668's hoist, finished at the crate root):
62// private module, `pub`/`pub(crate)` items — every consumer, both walk
63// engines included, imports downward from `crate::row`, the one public
64// path per item.
65mod row;
66// The relationship-uniqueness set in its boundary form (LABS-1116, the
67// set-type migration LABS-822 deferred): the type threaded through every
68// used-set signature — `Matched`, the walk-entry and probe-predicate
69// parameters, the GPM state carry. Hoisted to the crate root beside
70// `row` (LABS-668's precedent): the workspace meter and both walk
71// engines import downward from here, no module importing up. Its hasher
72// policy (engine-generated ids, so the id policy) is `hash_seed`'s.
73pub(crate) type UsedSet = hash_seed::IdSet<relate_core::RelId>;
74mod shortest;
75mod show_catalog;
76mod spatial;
77mod store;
78#[cfg(test)]
79mod test_support;
80// The tiered word-set utility (ADR-0522): the tier mechanics ADR-0507
81// built for the distinct set — one key class's words, inline then
82// promoted — freed of DISTINCT semantics so raw-key executor-internal
83// consumers (the pattern walker, frontier dedup) can hold it;
84// `distinct_set` delegates its word storage to it. Private module,
85// `pub(crate)` items.
86mod tiered_set;
87#[cfg(test)]
88mod tiered_set_tests;
89// The stored vector-index option schema (stellar round 3, std-6): the
90// key table, the storable-metric narrowing, and the one parse the CREATE
91// validation and the stored read share — split from the similarity
92// kernels in `vector_similarity` so the two concerns stop sharing a file.
93mod vector_config;
94mod vector_similarity;
95
96pub use catalog_meta::{DeprecatedBy, DeprecationForm};
97pub use consumer::{BatchFlow, RowConsumer, StreamSink, BATCH_ROWS};
98pub use csv::{CsvPolicy, CsvRemote, RemoteFailure};
99pub use ctx::BatchCommit;
100pub use effect::StatementEffect;
101pub use exec::bulk::{
102 analyze_bulk_write, BulkCursor, BulkTargets, BulkWrite, DEFAULT_BATCH_BUDGET,
103 DEFAULT_BATCH_THRESHOLD,
104};
105pub use exec::ddl_options::{
106 committed_catalog_ops, resolve_committed_index_options, CommittedIndexFact,
107};
108pub use exec::graph_stats::GraphStats;
109pub use exec::procedures::{check_explicit_arity, check_implicit_passing_mode};
110pub use exec::{
111 catalog_create_statements, ddl_notifications::ddl_notifications, execute, execute_read_at,
112 execute_read_streaming_at, ExecRequest, GradeProbe, QueryResult, ReadAdmission,
113};
114pub use frontier_decline::{FrontierDecline, FrontierDeclineReason, FrontierRunDecline};
115pub use function_registry::builtin_function_deprecation;
116pub use graph::constraint_keys::admission::{ConstraintAdmission, SlotPosition};
117pub use graph::{
118 AppliedTokenChanges, CheckpointTheater, ContainsCount, DatabaseEntry, Graph, Procedure,
119 QueryStats, SchemaSnapshot, SnapshotPin,
120};
121// The experimental property-store seam (ADR-0665): a columnar store installed
122// with `Graph::attach_prop_store` implements this trait. Doc-hidden — an
123// evaluation seam, not a stable public API.
124#[doc(hidden)]
125pub use graph::{PropFold, PropStore, PublishedRow};
126// The experimental columnar store (ADR-0665) behind the default-off
127// `vortex-store` gate (ADR-0703): the store, and the one call that builds it
128// from a graph and attaches it. Doc-hidden — an evaluation seam, not a stable
129// public API.
130#[cfg(feature = "vortex-store")]
131#[doc(hidden)]
132pub use graph::attach_vortex_store;
133#[cfg(feature = "vortex-store")]
134#[doc(hidden)]
135pub use graph::VortexStore;
136pub use metrics::{
137 BatchFacts, ClauseMetricsRecord, ExpandIntoCounters, FrontierCounters, HashJoinCounters,
138 InTxBatches, KernelRung, MemoCounters, PhaseTimes, PlanMetricsSink, StartReason,
139 StatementMemoRecord, StoreReads, VectorScanCounters, WalkStart,
140};
141// One public path (the graph module stays private): the whole-graph
142// index-rebuild count the facade's reopen tests read to pin the
143// empty-replay rebuild skip (LABS-1112). Test seam behind `test-hooks`,
144// never in a shipped build.
145#[cfg(feature = "test-hooks")]
146#[doc(hidden)]
147pub use graph::take_index_rebuilds;
148// The vector matrix's served-search count (ADR-0705), read by the facade's
149// differential test to prove the matrix side of the comparison ran.
150#[cfg(feature = "test-hooks")]
151#[doc(hidden)]
152pub use graph::take_vector_matrix_serves;
153// The adjacency side the `test-hooks` sealed-chunk count takes — the storage
154// open tests' wiring surface across the crate boundary.
155#[cfg(feature = "test-hooks")]
156#[doc(hidden)]
157pub use graph::Side;
158pub use query_engine::InMemoryQueryEngine;
159// Research-only (speed-of-light kernels), quarantined behind the
160// non-default `research` cargo feature (ADR-0476): the re-export (and the
161// modules themselves) compile only under that feature.
162#[cfg(feature = "research")]
163#[doc(hidden)]
164pub use graph::sol;
165
166// Research-only heap-census harness (same quarantine, ADR-0476): the
167// census example in relate-query-latency names `HeapCensus`; the nested
168// types are re-exported so every public census field has a public type.
169#[cfg(feature = "research")]
170#[doc(hidden)]
171pub use graph::census::{AdjacencyCensus, DeclaredCensus, HeapCensus};
172pub use graph_type::GraphTypeSpec;
173#[cfg(feature = "research")]
174#[doc(hidden)]
175pub use memory::ChainCensus;
176// The dense-span seed the group admission walk carries (ADR-0617 family):
177// workspace-internal — the write-local commit path threads it, deliberately
178// not advertised API beyond the workspace.
179#[doc(hidden)]
180pub use memory::DenseSpans;
181// The return of the admission entry points (`Graph::estimate_redo_delta` and
182// its `_with` variant): the same workspace-internal path as `DenseSpans`, so
183// the entry points' documented return type is nameable beside it.
184#[doc(hidden)]
185pub use memory::RedoDelta;
186pub use overlay::{ExecGraph, ScratchCheckpoint, StatementMark, WriteScratch};
187// The diagnostic switch's typed value (ADR-0519): re-exported for the
188// `relate` crate's open path (the resolver and the installer below),
189// the one public path — deliberately not advertised API beyond it.
190pub use pattern_engine::PatternEngine;
191// The ADR-0395 budget constant: workspace-internal (the `relate`
192// integration twin crosses the real budget with it), deliberately not
193// advertised API — the budget is a fixed contract, not a knob (ADR-0395:
194// "never ambient configuration").
195#[doc(hidden)]
196pub use overlay::NESTED_EVAL_BUDGET;
197// The re-arrival rule's work budget (the ADR-0395 fixed-constant family,
198// ADR-0516): workspace-internal (the PROFILE fixtures calibrate the budget
199// fraction against it), deliberately not advertised API — a fixed
200// contract, not a knob.
201#[doc(hidden)]
202pub use metrics::REARRIVAL_WORK_BUDGET;
203// The ADR-0463 default per-allocation expression cap: workspace-internal
204// (tests and the engine-default resolver read it), deliberately not
205// advertised API. The operator knob lives on the open options, not here.
206#[doc(hidden)]
207pub use memory::EXPRESSION_BUDGET_BYTES;
208// The ADR-0657 default shared memo budget (whole MiB): read by the engine's
209// open-time resolver, deliberately not advertised API.
210/// The statement's one write-attempt fact (ADR-0402 Decision 2): the plan
211/// walk over [`call_writes_store`]'s effect question and the planner's
212/// clause table — the READ access-mode gate's (ADR-0742) key, exported
213/// from the exec module that owns it.
214pub use exec::plan_mutates_store;
215#[doc(hidden)]
216pub use memory::DEFAULT_MEMO_BUDGET_MIB;
217pub use procedure_gate::{procedure_preview_feature, GatedCapability, GATED_CAPABILITIES};
218pub use procedure_registry::{
219 builtin_procedure_deprecation, builtin_procedure_signature, call_is_write,
220 is_ontology_procedure, is_ontology_store_op, is_ontology_write_procedure, is_void_procedure,
221 value_matches_proc_type, ProcSignature, BUILTIN_PROCEDURE_SIGNATURES,
222};
223pub use redo::{
224 legacy_property_encoding, props_from_json, split_legacy_property_encoding, IndexDetailSpec,
225 IndexFacts, IndexKindSpec, OntologyOp, PullKind, RedoOp, MAX_ONTOLOGY_SPEC_BYTES,
226};
227#[doc(hidden)]
228pub use workspace::{result_rows_bytes, ResultRowsMeter};
229
230/// Whether an `IN TRANSACTIONS` body takes the batch pass (ADR-0669):
231/// one clause-engine pass per batch instead of one nested invocation
232/// per row. Plan-time over the body's IR, so the plan node renders the
233/// execution strategy in its details.
234pub use exec::call::in_tx_strategy::batch_pass_admission;