pub enum AggContext {
Builtin(Vec<Value>),
External(ExternalAggState),
}Expand description
Aggregate context for accumulating values during GROUP BY. Built-in aggregates use a flat payload representation for efficiency and to share code between register-based and hash-based aggregation (future enhancement).
Variants§
Builtin(Vec<Value>)
Built-in aggregates store state as a flat Vec
External(ExternalAggState)
External (extension) aggregates need FFI state that can’t be serialized.
Implementations§
Source§impl AggContext
impl AggContext
pub fn compute_external(&self) -> Result<Value>
Sourcepub fn payload_mut(&mut self) -> &mut [Value]
pub fn payload_mut(&mut self) -> &mut [Value]
Get a mutable reference to the builtin payload as a slice
Sourcepub fn payload_vec_mut(&mut self) -> &mut Vec<Value>
pub fn payload_vec_mut(&mut self) -> &mut Vec<Value>
Get a mutable reference to the builtin payload Vec (for aggregates that grow the payload, e.g. array_agg).
Trait Implementations§
Source§impl Clone for AggContext
impl Clone for AggContext
Source§fn clone(&self) -> AggContext
fn clone(&self) -> AggContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AggContext
impl Debug for AggContext
Source§impl PartialEq for AggContext
impl PartialEq for AggContext
Source§impl PartialOrd for AggContext
impl PartialOrd for AggContext
impl StructuralPartialEq for AggContext
Auto Trait Implementations§
impl !Send for AggContext
impl !Sync for AggContext
impl Freeze for AggContext
impl RefUnwindSafe for AggContext
impl Unpin for AggContext
impl UnsafeUnpin for AggContext
impl UnwindSafe for AggContext
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more