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