pub struct PointFields(/* private fields */);Expand description
Record properties read with one point read per typed definition instead
of rebuilding the record (READ-1: sorting 667K matches, or checking an
unindexed age < 25 on them, rebuilt every one). Covers scalar record
properties only; Self::resolve answers None for a system field or a
property stored as an array anywhere, and the caller rebuilds the record.
A record holds one value per property: a write deletes the value of every typed definition of the property before it stores the new one (also when one batch writes the property twice). So the first definition holding a value is the only one, and definitions are probed in the order most records hold them: by descending owner support (under the read’s labels). A CSV column inferred as both Int64 and Float64 is read with one point read per row for most rows, not two.
Implementations§
Source§impl PointFields
impl PointFields
Sourcepub fn resolve<'n>(
snap: &QuerySnapshot,
tenant: TenantId,
names: impl IntoIterator<Item = &'n str>,
) -> Result<Option<Self>, QueryError>
pub fn resolve<'n>( snap: &QuerySnapshot, tenant: TenantId, names: impl IntoIterator<Item = &'n str>, ) -> Result<Option<Self>, QueryError>
Point reads for names, each row keyed by the name as given; None
when one of them needs the whole record. Definitions are probed by
their tenant-wide support.
§Errors
Returns storage read errors from the property catalog.
Sourcepub fn resolve_in<'n>(
snap: &QuerySnapshot,
tenant: TenantId,
labels: &[String],
names: impl IntoIterator<Item = &'n str>,
) -> Result<Option<Self>, QueryError>
pub fn resolve_in<'n>( snap: &QuerySnapshot, tenant: TenantId, labels: &[String], names: impl IntoIterator<Item = &'n str>, ) -> Result<Option<Self>, QueryError>
Self::resolve for records of labels (every label when empty):
definitions are probed by their support under those labels.
§Errors
Returns storage read errors from the property catalog.