pub struct AggregateFunction {
pub name: String,
pub args: Vec<Expression>,
pub distinct: bool,
pub filter: Option<Expression>,
pub order_by: Vec<Ordered>,
pub limit: Option<Box<Expression>>,
pub ignore_nulls: Option<bool>,
}Expand description
Represent a named aggregate function call with optional FILTER, ORDER BY, and LIMIT.
This struct is used for aggregate function calls that are not covered by
one of the dedicated typed variants (e.g. Count, Sum). It supports
SQL:2003 FILTER (WHERE …) clauses, ordered-set aggregates, and
IGNORE NULLS / RESPECT NULLS modifiers.
Fields§
§name: StringThe aggregate function name (e.g. “JSON_AGG”, “XMLAGG”).
args: Vec<Expression>Positional arguments.
distinct: boolWhether DISTINCT was specified.
filter: Option<Expression>Optional FILTER (WHERE …) clause applied to the aggregate.
order_by: Vec<Ordered>ORDER BY inside aggregate (e.g., JSON_AGG(x ORDER BY y))
limit: Option<Box<Expression>>LIMIT inside aggregate (e.g., ARRAY_CONCAT_AGG(x LIMIT 2))
ignore_nulls: Option<bool>IGNORE NULLS / RESPECT NULLS
Trait Implementations§
Source§impl Clone for AggregateFunction
impl Clone for AggregateFunction
Source§fn clone(&self) -> AggregateFunction
fn clone(&self) -> AggregateFunction
Returns a duplicate of the value. Read more
1.0.0 · 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 AggregateFunction
impl Debug for AggregateFunction
Source§impl Default for AggregateFunction
impl Default for AggregateFunction
Source§fn default() -> AggregateFunction
fn default() -> AggregateFunction
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AggregateFunction
impl<'de> Deserialize<'de> for AggregateFunction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AggregateFunction
impl PartialEq for AggregateFunction
Source§impl Serialize for AggregateFunction
impl Serialize for AggregateFunction
impl StructuralPartialEq for AggregateFunction
Auto Trait Implementations§
impl Freeze for AggregateFunction
impl RefUnwindSafe for AggregateFunction
impl Send for AggregateFunction
impl Sync for AggregateFunction
impl Unpin for AggregateFunction
impl UnwindSafe for AggregateFunction
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