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 contracts;
22pub(crate) mod cursor;
23pub(crate) mod explain;
24pub(crate) mod expr;
25pub(crate) mod fingerprint;
26pub(crate) mod fluent;
27pub(crate) mod intent;
28pub(crate) mod plan;
29pub(crate) mod policy;
30pub(crate) mod predicate;
31
32/// ---------------------------------------------------------------------
33/// Public Contract Types
34/// ---------------------------------------------------------------------
35
36///
37/// ReadConsistency
38///
39/// Missing-row handling policy for query execution.
40///
41/// This is part of the query contract and is re-exported at the `db`
42/// boundary. It is stable API surface.
43///
44
45#[derive(Clone, Copy, Debug, Eq, PartialEq)]
46pub enum ReadConsistency {
47 /// Missing rows are ignored (no error).
48 MissingOk,
49
50 /// Missing rows are treated as corruption.
51 Strict,
52}