icydb_core/db/query/mod.rs
1//! Query subsystem (Tier-2 boundary within `db`).
2//!
3//! This module defines the *semantic query contract* for IcyDB:
4//! - Query intent construction
5//! - Predicate expression modeling
6//! - Planning and ordering semantics
7//! - Session-level query wrappers
8//!
9//! Although it lives under `db/`, `query` acts as a **Tier-2 boundary**
10//! within the database subsystem. Its public types (re-exported at
11//! `db` root) form part of the stable query surface.
12//!
13//! Deep modules (e.g. `plan`, `predicate`, `intent`) are crate-visible
14//! for internal use, but external crates must only rely on types
15//! intentionally re-exported at the `db` boundary.
16//!
17//! Predicate semantics are defined in `docs/QUERY_PRACTICE.md` and are
18//! the canonical contract for evaluation, coercion, and normalization.
19
20pub(crate) mod builder;
21pub(crate) mod cursor;
22pub(crate) mod explain;
23pub(crate) mod expr;
24pub(crate) mod fingerprint;
25pub(crate) mod fluent;
26pub(crate) mod intent;
27pub(crate) mod plan;
28pub(crate) mod policy;
29pub(crate) mod predicate;
30
31/// ---------------------------------------------------------------------
32/// Public Contract Types
33/// ---------------------------------------------------------------------
34
35///
36/// ReadConsistency
37///
38/// Missing-row handling policy for query execution.
39///
40/// This is part of the query contract and is re-exported at the `db`
41/// boundary. It is stable API surface.
42///
43
44#[derive(Clone, Copy, Debug, Eq, PartialEq)]
45pub enum ReadConsistency {
46 /// Missing rows are ignored (no error).
47 MissingOk,
48
49 /// Missing rows are treated as corruption.
50 Strict,
51}