pub struct AggregationSqlGenerator { /* private fields */ }Expand description
Aggregation SQL generator
Implementations§
Source§impl AggregationSqlGenerator
impl AggregationSqlGenerator
Sourcepub fn build_where_clause_parameterized(
&self,
where_clause: &WhereClause,
metadata: &FactTableMetadata,
params: &mut Vec<Value>,
) -> Result<String>
pub fn build_where_clause_parameterized( &self, where_clause: &WhereClause, metadata: &FactTableMetadata, params: &mut Vec<Value>, ) -> Result<String>
Build a parameterized WHERE … clause, or an empty string if the clause is empty.
§Errors
Returns an error if WHERE clause generation fails.
Source§impl AggregationSqlGenerator
impl AggregationSqlGenerator
Sourcepub const fn new(database_type: DatabaseType) -> Self
pub const fn new(database_type: DatabaseType) -> Self
Create new SQL generator for specific database
Sourcepub fn generate_parameterized(
&self,
plan: &AggregationPlan,
) -> Result<ParameterizedAggregationSql>
pub fn generate_parameterized( &self, plan: &AggregationPlan, ) -> Result<ParameterizedAggregationSql>
Generate a parameterized aggregate SQL query.
All user-supplied string values in WHERE and HAVING clauses are emitted as
bind placeholders ($N / ? / @P1 depending on the database dialect) rather
than being embedded as escaped string literals. Numeric, boolean, and NULL
values are still inlined since they carry no injection risk.
§Errors
Returns error if SQL generation fails (unknown aggregate function, etc.).
Auto Trait Implementations§
impl Freeze for AggregationSqlGenerator
impl RefUnwindSafe for AggregationSqlGenerator
impl Send for AggregationSqlGenerator
impl Sync for AggregationSqlGenerator
impl Unpin for AggregationSqlGenerator
impl UnsafeUnpin for AggregationSqlGenerator
impl UnwindSafe for AggregationSqlGenerator
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
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