Skip to main content

Module document_count

Module document_count 

Source
Expand description

FromProof + Fetch for [DocumentCount] — the single-row aggregate count view of the unified getDocuments endpoint.

Callers build a DocumentQuery with .with_select(Select::Count), optionally adding a with_where(...) clause; whatever the request shape, this impl returns a single u64 (the aggregate count). Per-shape proof dispatch lives in [super::count_proof_helpers::verify_count_query] — this impl just sums the verified entries the helper returns.

Empty entries (e.g. a verifier that emitted None for a queried-but-absent branch) contribute 0 to the sum via filter_map(|e| e.count).