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;
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, FrontierCounters, InTxBatches, KernelRung, MemoCounters,
138 PhaseTimes, PlanMetricsSink, StartReason, StatementMemoRecord, StoreReads, WalkStart,
139};
140// One public path (the graph module stays private): the whole-graph
141// index-rebuild count the facade's reopen tests read to pin the
142// empty-replay rebuild skip (LABS-1112). Test seam behind `test-hooks`,
143// never in a shipped build.
144#[cfg(feature = "test-hooks")]
145#[doc(hidden)]
146pub use graph::take_index_rebuilds;
147// The vector matrix's served-search count (ADR-0705), read by the facade's
148// differential test to prove the matrix side of the comparison ran.
149#[cfg(feature = "test-hooks")]
150#[doc(hidden)]
151pub use graph::take_vector_matrix_serves;
152// The adjacency side the `test-hooks` sealed-chunk count takes — the storage
153// open tests' wiring surface across the crate boundary.
154#[cfg(feature = "test-hooks")]
155#[doc(hidden)]
156pub use graph::Side;
157pub use query_engine::InMemoryQueryEngine;
158// Research-only (speed-of-light kernels), quarantined behind the
159// non-default `research` cargo feature (ADR-0476): the re-export (and the
160// modules themselves) compile only under that feature.
161#[cfg(feature = "research")]
162#[doc(hidden)]
163pub use graph::sol;
164
165// Research-only heap-census harness (same quarantine, ADR-0476): the
166// census example in relate-query-latency names `HeapCensus`; the nested
167// types are re-exported so every public census field has a public type.
168#[cfg(feature = "research")]
169#[doc(hidden)]
170pub use graph::census::{AdjacencyCensus, DeclaredCensus, HeapCensus};
171pub use graph_type::GraphTypeSpec;
172#[cfg(feature = "research")]
173#[doc(hidden)]
174pub use memory::ChainCensus;
175// The dense-span seed the group admission walk carries (ADR-0617 family):
176// workspace-internal — the write-local commit path threads it, deliberately
177// not advertised API beyond the workspace.
178#[doc(hidden)]
179pub use memory::DenseSpans;
180// The return of the admission entry points (`Graph::estimate_redo_delta` and
181// its `_with` variant): the same workspace-internal path as `DenseSpans`, so
182// the entry points' documented return type is nameable beside it.
183#[doc(hidden)]
184pub use memory::RedoDelta;
185pub use overlay::{ExecGraph, ScratchCheckpoint, StatementMark, WriteScratch};
186// The diagnostic switch's typed value (ADR-0519): re-exported for the
187// `relate` crate's open path (the resolver and the installer below),
188// the one public path — deliberately not advertised API beyond it.
189pub use pattern_engine::PatternEngine;
190// The ADR-0395 budget constant: workspace-internal (the `relate`
191// integration twin crosses the real budget with it), deliberately not
192// advertised API — the budget is a fixed contract, not a knob (ADR-0395:
193// "never ambient configuration").
194#[doc(hidden)]
195pub use overlay::NESTED_EVAL_BUDGET;
196// The re-arrival rule's work budget (the ADR-0395 fixed-constant family,
197// ADR-0516): workspace-internal (the PROFILE fixtures calibrate the budget
198// fraction against it), deliberately not advertised API — a fixed
199// contract, not a knob.
200#[doc(hidden)]
201pub use metrics::REARRIVAL_WORK_BUDGET;
202// The ADR-0463 default per-allocation expression cap: workspace-internal
203// (tests and the engine-default resolver read it), deliberately not
204// advertised API. The operator knob lives on the open options, not here.
205#[doc(hidden)]
206pub use memory::EXPRESSION_BUDGET_BYTES;
207// The ADR-0657 default shared memo budget (whole MiB): read by the engine's
208// open-time resolver, deliberately not advertised API.
209#[doc(hidden)]
210pub use memory::DEFAULT_MEMO_BUDGET_MIB;
211pub use procedure_gate::procedure_preview_feature;
212pub use procedure_registry::{
213 builtin_procedure_deprecation, builtin_procedure_signature, call_is_write,
214 is_ontology_procedure, is_ontology_store_op, is_ontology_write_procedure, is_void_procedure,
215 value_matches_proc_type, ProcSignature, BUILTIN_PROCEDURE_SIGNATURES,
216};
217pub use redo::{
218 legacy_property_encoding, props_from_json, split_legacy_property_encoding, IndexDetailSpec,
219 IndexFacts, IndexKindSpec, OntologyOp, PullKind, RedoOp, MAX_ONTOLOGY_SPEC_BYTES,
220};
221#[doc(hidden)]
222pub use workspace::{result_rows_bytes, ResultRowsMeter};
223
224/// Whether an `IN TRANSACTIONS` body takes the batch pass (ADR-0669):
225/// one clause-engine pass per batch instead of one nested invocation
226/// per row. Plan-time over the body's IR, so the plan node renders the
227/// execution strategy in its details.
228pub use exec::call::in_tx_strategy::batch_pass_admission;