pub struct FunctionsBuilder<'a> { /* private fields */ }
Expand description

A builder that can create scalar function expressions

Implementations§

source§

impl<'a> FunctionsBuilder<'a>

source

pub fn new_builder( &self, func: &'static FunctionDefinition, args: Vec<Expression> ) -> FunctionBuilder<'_>

Creates a new FunctionBuilder based on a given function definition.

This method is not typically used directly. Instead, extension functions like add or subtract are used which call this function.

However, this could be used directly for UDFs if you don’t want to create an extension trait.

source

pub fn lookup_field_by_name(&self, name: impl Into<String>) -> Expression

Creates a “late lookup” function expression

This is not really a function call. It’s a placeholder we are currently using to indicate an unresolved field reference. This is created whenever a user creates a field reference by name but the schema is unknown or does not know names.

Trait Implementations§

source§

impl<'a> FunctionsArithmeticExt for FunctionsBuilder<'a>

source§

fn add(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn subtract(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn multiply(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn divide(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn negate(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn modulus(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn power(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn sqrt(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn exp(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn cos(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn sin(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn tan(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn cosh(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn sinh(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn tanh(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn acos(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn asin(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn atan(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn acosh(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn asinh(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn atanh(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn atan_2(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn radians(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn degrees(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn abs(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn sign(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn factorial(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn bitwise_not(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn bitwise_and(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn bitwise_or(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn bitwise_xor(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

impl<'a> FunctionsBooleanExt for FunctionsBuilder<'a>

source§

fn or(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn and(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

fn and_not(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn xor(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn not(&self, arg0: Expression) -> FunctionBuilder<'_>

source§

impl<'a> FunctionsComparisonExt for FunctionsBuilder<'a>

source§

impl<'a> FunctionsDatetimeExt for FunctionsBuilder<'a>

source§

fn extract(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn extract3( &self, arg0: Expression, arg1: Expression, arg2: Expression ) -> FunctionBuilder<'_>

source§

fn extract4( &self, arg0: Expression, arg1: Expression, arg2: Expression, arg3: Expression ) -> FunctionBuilder<'_>

source§

fn extract_boolean( &self, arg0: Expression, arg1: Expression ) -> FunctionBuilder<'_>

source§

fn extract_boolean3( &self, arg0: Expression, arg1: Expression, arg2: Expression ) -> FunctionBuilder<'_>

source§

fn add(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn add3( &self, arg0: Expression, arg1: Expression, arg2: Expression ) -> FunctionBuilder<'_>

source§

fn add_intervals( &self, arg0: Expression, arg1: Expression ) -> FunctionBuilder<'_>

source§

fn subtract(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn subtract3( &self, arg0: Expression, arg1: Expression, arg2: Expression ) -> FunctionBuilder<'_>

source§

fn lte(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn lt(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn gte(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn gt(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn assume_timezone( &self, arg0: Expression, arg1: Expression ) -> FunctionBuilder<'_>

source§

fn local_timestamp( &self, arg0: Expression, arg1: Expression ) -> FunctionBuilder<'_>

source§

fn strptime_time( &self, arg0: Expression, arg1: Expression ) -> FunctionBuilder<'_>

source§

fn strptime_date( &self, arg0: Expression, arg1: Expression ) -> FunctionBuilder<'_>

source§

fn strptime_timestamp( &self, arg0: Expression, arg1: Expression ) -> FunctionBuilder<'_>

source§

fn strptime_timestamp3( &self, arg0: Expression, arg1: Expression, arg2: Expression ) -> FunctionBuilder<'_>

source§

fn strftime(&self, arg0: Expression, arg1: Expression) -> FunctionBuilder<'_>

source§

fn strftime3( &self, arg0: Expression, arg1: Expression, arg2: Expression ) -> FunctionBuilder<'_>

source§

fn round_temporal( &self, arg0: Expression, arg1: Expression, arg2: Expression, arg3: Expression, arg4: Expression ) -> FunctionBuilder<'_>

source§

fn round_temporal6( &self, arg0: Expression, arg1: Expression, arg2: Expression, arg3: Expression, arg4: Expression, arg5: Expression ) -> FunctionBuilder<'_>

source§

fn round_calendar( &self, arg0: Expression, arg1: Expression, arg2: Expression, arg3: Expression, arg4: Expression ) -> FunctionBuilder<'_>

source§

fn round_calendar6( &self, arg0: Expression, arg1: Expression, arg2: Expression, arg3: Expression, arg4: Expression, arg5: Expression ) -> FunctionBuilder<'_>

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for FunctionsBuilder<'a>

§

impl<'a> Send for FunctionsBuilder<'a>

§

impl<'a> Sync for FunctionsBuilder<'a>

§

impl<'a> Unpin for FunctionsBuilder<'a>

§

impl<'a> UnwindSafe for FunctionsBuilder<'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<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, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.