pub struct DirectReadProjection {
pub leaf_fields: usize,
pub limit: Option<u32>,
pub nested: Vec<DirectReadProjection>,
}Expand description
A direct read’s projection, in the shape the cost estimator scores it.
The leaf fields this level materialises, the page it materialises them over, and every level composed into the same statement beneath it.
Every read this codebase issues today is flat — leaves, a page, no
nesting — and scores exactly what a bare field count scored before this type
existed. The nesting is here because the REST ?select= fan-out is to be composed
into the parent statement with LATERAL, and a composed statement materialises its
embedded levels itself. Handed to a flat estimator it would be charged for the
parent’s own columns alone, and per_request_max would loosen by whatever the embed
adds — silently, because the number the operator wrote would not have changed.
Fields§
§leaf_fields: usizeScalar fields projected at this level.
limit: Option<u32>The page this level is read over. None is an unpaginated read and scores a
multiplier of 1, for the reason given on estimate_direct_read_cost.
nested: Vec<DirectReadProjection>The levels composed into the same statement beneath this one, each with its
own page — which is the point of LATERAL: the embedded ORDER BY/LIMIT
live inside the subquery, so a nested level’s page is genuinely its own and
not a share of the parent’s.
Implementations§
Trait Implementations§
Source§impl Clone for DirectReadProjection
impl Clone for DirectReadProjection
Source§impl Debug for DirectReadProjection
impl Debug for DirectReadProjection
Source§impl Default for DirectReadProjection
impl Default for DirectReadProjection
impl Eq for DirectReadProjection
Source§impl PartialEq for DirectReadProjection
impl PartialEq for DirectReadProjection
impl StructuralPartialEq for DirectReadProjection
Auto Trait Implementations§
impl Freeze for DirectReadProjection
impl RefUnwindSafe for DirectReadProjection
impl Send for DirectReadProjection
impl Sync for DirectReadProjection
impl Unpin for DirectReadProjection
impl UnsafeUnpin for DirectReadProjection
impl UnwindSafe for DirectReadProjection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.