Skip to main content

Module projection

Module projection 

Source
Expand description

SELECT projection types for the v1 getDocuments surface.

The projection determines what the response carries:

Per-function field requirements live in SelectProjection::field; the type itself just carries the (function, field) pair.

Shared between the wire-decoding layer (rs-drive-abci/src/query/document_query/v1/conversions.rs) and the SDK’s request builder (rs-sdk/src/platform/documents/document_query.rs). Server capability today: SelectFunction::Documents, SelectFunction::Count with empty field (= COUNT(*)), SelectFunction::Sum, and SelectFunction::Avg route through the drive count / sum / average dispatchers and are evaluated end-to-end (no-proof and proof paths). SelectFunction::Count with non-empty field (= COUNT(field)), SelectFunction::Min, and SelectFunction::Max are wire-stable but rejected at routing time with QuerySyntaxError::Unsupported("SELECT … is not yet implemented") — the surface is shipped first so callers can encode against it, with execution landing later without another version bump.

Structs§

SelectProjection
(function, field) projection. The field semantics depend on function:

Enums§

SelectFunction
Projection function applied by SELECT. Distinct from crate::query::HavingAggregateFunction because this enum carries the document-fetch branch too — SELECT may return rows, not just aggregates — so the two can’t share a type.