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