Skip to main content

drive/query/drive_document_count_query/executors/
mod.rs

1//! Per-mode count-query executors on `impl Drive`. One file per
2//! [`super::DocumentCountMode`] variant — the dispatcher
3//! ([`super::drive_dispatcher`]) calls into the right one based
4//! on the detected mode.
5//!
6//! Each executor:
7//!
8//! 1. Picks the right covering index for its mode (returns
9//!    `Error::Query(QuerySyntaxError::WhereClauseOnNonIndexedProperty)`
10//!    if no index covers the where clauses).
11//! 2. Builds the appropriate `DriveDocumentCountQuery`.
12//! 3. Runs the matching method on it (`execute_no_proof`,
13//!    `execute_range_count_no_proof`,
14//!    `execute_aggregate_count_with_proof`,
15//!    `execute_distinct_count_with_proof`, or
16//!    `execute_point_lookup_count_with_proof`).
17//! 4. Returns `Vec<SplitCountEntry>` (no-proof modes) or
18//!    `Vec<u8>` proof bytes (proof modes).
19//!
20//! Splitting along mode boundaries — one file per mode — keeps
21//! each executor's index-picking + clause-handling logic local
22//! and lets the dispatcher's match arms stay one line each. No
23//! re-exports are needed: each file adds methods directly to
24//! `impl Drive`, so callers (the dispatcher) just see them on
25//! the `Drive` type.
26
27pub mod per_in_value;
28pub mod point_lookup_proof;
29pub mod range_aggregate_carrier_proof;
30pub mod range_distinct_proof;
31pub mod range_no_proof;
32pub mod range_proof;
33pub mod total;