Skip to main content

Module drive_document_count_query

Module drive_document_count_query 

Source
Expand description

A query to count documents using CountTree elements Types and module structure for the GetDocumentsCount query.

The implementation is split across siblings:

  • [mode_detection] — operator classification + detect_mode.
  • [index_picker] — covering-index pickers (find_countable_index_*, find_range_countable_index_*).
  • [path_query] — the load-bearing prover/verifier-agreement path-query builders (aggregate_count_path_query, distinct_count_path_query, range_clause_to_query_item).
  • [execute_point_lookup] — Equal/In point-lookup execution (execute_no_proof, execute_with_proof).
  • [execute_range_count] — range-mode execution + RangeCountOptions.
  • [drive_dispatcher] — impl Drive per-mode dispatchers + DocumentCountRequest / DocumentCountResponse + execute_document_count_request.
  • [tests] (cfg server + test) — integration tests.

This file owns the three public types every other submodule references and the corresponding mod / pub use plumbing.

Re-exports§

pub use super::conditions::WhereOperator;
pub use crate::error::query::QuerySyntaxError;
pub use drive_dispatcher::DocumentCountRequest;
pub use drive_dispatcher::DocumentCountResponse;
pub use execute_range_count::RangeCountOptions;

Modules§

drive_dispatcher
Top-level dispatcher for the unified GetDocumentsCount request.
execute_point_lookup
Equal/In point-lookup execution paths for the count query.
execute_range_count
Range execution paths for the count query.
executors
Per-mode count-query executors on impl Drive. One file per super::DocumentCountMode variant — the dispatcher (super::drive_dispatcher) calls into the right one based on the detected mode.
index_picker
Index pickers for the count query.
mode_detection
Mode detection + operator classification for the count query.
path_query
Path-query builders for the count query.

Structs§

DriveDocumentCountQuery
A query to count documents using CountTree elements in the index path.
SplitCountEntry
An entry in a split count result, containing the serialized key(s) and the count of documents matching them.

Enums§

CountMode
SQL-shaped count-query mode — names the response shape the caller asked for via (select, group_by) on the wire.
DocumentCountMode
Classification of a count query’s shape, used to dispatch to the right executor. Returned by DriveDocumentCountQuery::detect_mode.

Constants§

MAX_CARRIER_AGGREGATE_OUTER_RANGE_LIMIT
Platform-wide maximum outer-walk cap for carrier-aggregate range-outer proofs (chapter 30 G8: outer_range_field > X AND inner_acor_field > Y with group_by = [outer_range_field] and prove = true).
MAX_LIMIT_AS_FAILSAFE
Hard cap on entries the count fan-out arms ask the executor to return.