Expand description
FromProof + Fetch for [DocumentSplitCounts] — the
per-group-entry view of the unified getDocuments endpoint.
Backed by the same DocumentQuery as
[drive_proof_verifier::DocumentCount]; the only difference
is response shape — DocumentSplitCounts returns the full
entries list keyed by the splitting property’s serialized
value, while DocumentCount returns the sum.
Per-shape proof dispatch lives in
[super::count_proof_helpers::verify_count_query] — this
impl passes the verified entries through unchanged.
Shapes emitted by verify_count_query:
group_by = [](aggregate): one entry with emptykeycarrying the verified total.AggregateCountOnRange, primary-key CountTree, and point-lookup-on-Equal-only paths all collapse to this shape.group_by = [in_field](per-In entries): one entry per present queried In value, withcount: Some(n). Absent In branches are omitted fromentries— the current point-lookup path query doesn’t request absence proofs, so grovedb’sverify_querysurfaces only present(path, key, Some(Element))triples. Callers that need to distinguish “verified zero” from “queried but absent” diff their request’s In array against the returned entries bykey(each entry’skeyisserialize_value_for_key(in_field, v)).group_by = [range_field]/[in_field, range_field](distinct walk): one entry per distinct value in the range (compound queries: per(in_key, key)pair). A value with no documents is absent, except on an index that can hold an empty group (Drive’sindex_keeps_empty_groups: one a preallocated or anoutlivesDeleteindex shares its levels with, asummableOffCountIndexcounter at zero included): there it comes back withcount: Some(0), counted in the page’s limit. A short page is not proof the range ended: across anIN, grovedb also charges the limit for anINvalue whose range holds nothing, and anullSearchable: falseindex’s empty null-key group is counted and left out when the range includes the empty key.