pub struct Function {
pub name: String,
pub args: Vec<BExpression>,
pub aggregation: Option<Aggregation>,
pub subquery: Option<Subquery>,
pub span: Option<Span>,
}
Expand description
A function call.
Note that function names, arguments, argument types, and return types are not validated.
Fields§
§name: String
§args: Vec<BExpression>
§aggregation: Option<Aggregation>
§subquery: Option<Subquery>
§span: Option<Span>
Implementations§
Source§impl Function
impl Function
pub fn new<S: Into<String>>(name: S) -> Function
Sourcepub fn name<S: Into<String>>(self, name: S) -> Self
pub fn name<S: Into<String>>(self, name: S) -> Self
Replaces this Function’s name with the given string
Note that the new name is not validated.
Sourcepub fn arg(self, arg: Expression) -> Self
pub fn arg(self, arg: Expression) -> Self
Adds the given expression as new argument to this function
Sourcepub fn aggregation(self, aggregation: Aggregation) -> Self
pub fn aggregation(self, aggregation: Aggregation) -> Self
Sets this Function’s aggregation clause
Sourcepub fn clear_aggregation(self) -> Self
pub fn clear_aggregation(self) -> Self
Clears this Function’s aggregation clause, if any
pub fn subquery(self, subquery: Subquery) -> Self
pub fn clear_subquery(self) -> Self
pub fn span<S: Into<Span>>(self, span: S) -> Self
Sourcepub fn wrap(self) -> Expression
pub fn wrap(self) -> Expression
Wraps this function in an Expression
pub fn return_value(&self) -> ReturnValue
Trait Implementations§
impl StructuralPartialEq for Function
Auto Trait Implementations§
impl Freeze for Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
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