Skip to main content

GroupedQueryFn

Struct GroupedQueryFn 

Source
pub struct GroupedQueryFn<'a> {
    pub analyzed: &'a AnalyzedQuery,
    pub parent_struct_name: &'a str,
    pub child_struct_name: &'a str,
    pub all_columns: &'a [ResolvedColumn],
    pub parent_columns: &'a [ResolvedColumn],
    pub child_columns: &'a [ResolvedColumn],
    pub params: &'a [ResolvedParam],
    pub key_column: &'a str,
}
Expand description

Inputs for CodegenBackend::generate_grouped_query_fn.

The grouped query-fn contract carries enough context (analyzed query, both struct names, the flat and split column sets, params, and the grouping key) that passing it positionally trips clippy::too_many_arguments. Bundling it into one struct keeps the per-language implementations uniform as backends opt in to grouped codegen.

Fields§

§analyzed: &'a AnalyzedQuery

Full analyzed query (SQL, name, params, optional_params, deprecated, …).

§parent_struct_name: &'a str

Name of the generated parent struct.

§child_struct_name: &'a str

Name of the generated child struct.

§all_columns: &'a [ResolvedColumn]

All resolved columns in flat SELECT order; used for row decoding.

§parent_columns: &'a [ResolvedColumn]

Resolved columns belonging to the parent struct.

§child_columns: &'a [ResolvedColumn]

Resolved columns belonging to the child struct(s).

§params: &'a [ResolvedParam]

Resolved query parameters.

§key_column: &'a str

Grouping key column name in the flat result row (matches scythe_core::analyzer::GroupByConfig::key_column).

Auto Trait Implementations§

§

impl<'a> Freeze for GroupedQueryFn<'a>

§

impl<'a> RefUnwindSafe for GroupedQueryFn<'a>

§

impl<'a> Send for GroupedQueryFn<'a>

§

impl<'a> Sync for GroupedQueryFn<'a>

§

impl<'a> Unpin for GroupedQueryFn<'a>

§

impl<'a> UnsafeUnpin for GroupedQueryFn<'a>

§

impl<'a> UnwindSafe for GroupedQueryFn<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.