Expand description
Request-shape validation for the ranked query, and the versioned
(select, group_by, order_by, limit, offset) → DocumentRankedMode
resolution.
Pure functions on the request shape — no Drive, no contract, no
indexes. Available under server (the dispatcher validates before
executing) and verify (the SDK validates the same way before
attempting proof verification), so both sides agree on which requests
are well-formed and on the (axis, descending, k, offset) tuple a
well-formed one resolves to. Index-dependent validation (“does an
index actually cover this axis?”) needs the document type’s index map
and lives in super::index_picker.
Versioned through
platform_version.drive.methods.document.query.detect_ranked_mode,
the same way
DriveDocumentCountQuery::detect_mode_versioned
routes count’s table: the accepted request grammar is a consensus-
adjacent contract on the query surface, so relaxing it later has to
land behind a method-version bump rather than changing what an
already-deployed protocol version accepts.
Functions§
- detect_
ranked_ mode - Versioned entry point. Routes through
platform_version.drive.methods.document.query.detect_ranked_mode; today only0is defined and maps todetect_ranked_mode_v0verbatim. - detect_
ranked_ mode_ v0 - v0 of the ranked request grammar.
- prefix_
pins_ from_ where_ clauses - Translate a request’s
whereclauses into prefix pins — onePrefixPinper clause, carrying the pinned property and its value(s): one value from an==clause, several from the (at most one)IN— for the ranked and having-range surfaces. - ranked_
order_ key - The
ORDER BYfield name that names a given select’s aggregate.