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