Enum gluesql_core::ast::Function
source · pub enum Function {
Show 62 variants
Abs(Expr),
Lower(Expr),
Initcap(Expr),
Upper(Expr),
Left {
expr: Expr,
size: Expr,
},
Right {
expr: Expr,
size: Expr,
},
Asin(Expr),
Acos(Expr),
Atan(Expr),
Lpad {
expr: Expr,
size: Expr,
fill: Option<Expr>,
},
Rpad {
expr: Expr,
size: Expr,
fill: Option<Expr>,
},
Cast {
expr: Expr,
data_type: DataType,
},
Ceil(Expr),
Concat(Vec<Expr>),
ConcatWs {
separator: Expr,
exprs: Vec<Expr>,
},
Custom {
name: String,
exprs: Vec<Expr>,
},
IfNull {
expr: Expr,
then: Expr,
},
Rand(Option<Expr>),
Round(Expr),
Floor(Expr),
Trim {
expr: Expr,
filter_chars: Option<Expr>,
trim_where_field: Option<TrimWhereField>,
},
Exp(Expr),
Extract {
field: DateTimeField,
expr: Expr,
},
Ln(Expr),
Log {
antilog: Expr,
base: Expr,
},
Log2(Expr),
Log10(Expr),
Div {
dividend: Expr,
divisor: Expr,
},
Mod {
dividend: Expr,
divisor: Expr,
},
Gcd {
left: Expr,
right: Expr,
},
Lcm {
left: Expr,
right: Expr,
},
Sin(Expr),
Cos(Expr),
Tan(Expr),
Sqrt(Expr),
Power {
expr: Expr,
power: Expr,
},
Radians(Expr),
Degrees(Expr),
Now(),
Pi(),
Ltrim {
expr: Expr,
chars: Option<Expr>,
},
Rtrim {
expr: Expr,
chars: Option<Expr>,
},
Reverse(Expr),
Repeat {
expr: Expr,
num: Expr,
},
Sign(Expr),
Substr {
expr: Expr,
start: Expr,
count: Option<Expr>,
},
Unwrap {
expr: Expr,
selector: Expr,
},
GenerateUuid(),
Format {
expr: Expr,
format: Expr,
},
ToDate {
expr: Expr,
format: Expr,
},
ToTimestamp {
expr: Expr,
format: Expr,
},
ToTime {
expr: Expr,
format: Expr,
},
Position {
from_expr: Expr,
sub_expr: Expr,
},
FindIdx {
from_expr: Expr,
sub_expr: Expr,
start: Option<Expr>,
},
Ascii(Expr),
Chr(Expr),
Append {
expr: Expr,
value: Expr,
},
Prepend {
expr: Expr,
value: Expr,
},
GetX(Expr),
GetY(Expr),
Point {
x: Expr,
y: Expr,
},
CalcDistance {
geometry1: Expr,
geometry2: Expr,
},
}Variants§
Abs(Expr)
Lower(Expr)
Initcap(Expr)
Upper(Expr)
Left
Right
Asin(Expr)
Acos(Expr)
Atan(Expr)
Lpad
Rpad
Cast
Ceil(Expr)
Concat(Vec<Expr>)
ConcatWs
Custom
IfNull
Rand(Option<Expr>)
Round(Expr)
Floor(Expr)
Trim
Exp(Expr)
Extract
Ln(Expr)
Log
Log2(Expr)
Log10(Expr)
Div
Mod
Gcd
Lcm
Sin(Expr)
Cos(Expr)
Tan(Expr)
Sqrt(Expr)
Power
Radians(Expr)
Degrees(Expr)
Now()
Pi()
Ltrim
Rtrim
Reverse(Expr)
Repeat
Sign(Expr)
Substr
Unwrap
GenerateUuid()
Format
ToDate
ToTimestamp
ToTime
Position
FindIdx
Ascii(Expr)
Chr(Expr)
Append
Prepend
GetX(Expr)
GetY(Expr)
Point
CalcDistance
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Function
impl<'de> Deserialize<'de> for Function
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<Function> for Function
impl PartialEq<Function> for Function
source§impl<'a> TryFrom<FunctionNode<'a>> for Function
impl<'a> TryFrom<FunctionNode<'a>> for Function
impl Eq for Function
impl StructuralEq for Function
impl StructuralPartialEq for Function
Auto Trait Implementations§
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.