pub fn refuse_a_range_total_through_a_ranked_index(
document_type: DocumentTypeRef<'_>,
index: &Index,
) -> Result<(), Error>Expand description
Refuses a range total (one aggregate over a range, or one per carrier
branch) read through index when its path passes through a ranked level:
a level whose property-name tree Drive lays out as an indexed tree,
whichever of the type’s indexes ranks it (an index may continue below
another’s ranked last property). It walks the type’s index structure along
the index’s levels and asks each the resolver the write path uses
([property_name_tree_type_and_ranked_axes_for_level]), so it reads the
layout Drive builds. grovedb’s range aggregates neither read an indexed
tree (AggregateCountOnRange, AggregateSumOnRange and
AggregateCountAndSumOnRange take provable trees only) nor descend
through one when proving. An unproven read through a ranked ancestor
would succeed (it opens only the leaf tree), but it is refused as well:
every count, sum and count-and-sum range-total path builder calls this, so
the unproven read, the proof and its verification refuse alike rather than
answering only without a proof. Grouped by the last property, the same
range reads each value.
Unversioned, so every protocol version reaches it: rankings exist only from protocol version 14 (meta-schema v3), so no level is an indexed tree before and it refuses nothing.