pub enum ScalarFunction {
Show 20 variants
Arithmetic {
op: ArithmeticOp,
},
Comparison {
op: ComparisonOp,
},
String {
op: StringOp,
},
Cast {
target_type: CastTarget,
},
Date {
op: DateOp,
},
List {
op: ListOp,
},
Map {
op: MapOp,
},
Struct {
op: StructOp,
},
Boolean {
op: BooleanOp,
},
Utility {
op: UtilityOp,
},
Schema {
op: SchemaOp,
},
Array {
op: ArrayOp,
},
Path {
op: PathOp,
},
Uuid,
CustomScalar {
name: String,
execute: Arc<dyn Fn(&[Value]) -> Result<Value, String> + Send + Sync>,
},
SequenceOp {
is_nextval: bool,
},
Hash {
op: HashOp,
},
Interval {
op: IntervalOp,
},
Blob {
op: BlobOp,
},
Union {
op: UnionOp,
},
}Expand description
All built-in scalar function variants.
Variants§
Arithmetic
Fields
§
op: ArithmeticOpComparison
Fields
§
op: ComparisonOpString
Cast
Fields
§
target_type: CastTargetDate
List
Map
Struct
Boolean
Utility
Schema
Array
Path
Path functions — operate on recursive rel / path values.
Uuid
UUID function — generates random UUIDs.
CustomScalar
Extension-provided scalar function with a callback closure. The closure receives input values and returns an output value.
SequenceOp
Sequence operation (nextval/currval) — requires catalog access. Resolved at the connection/processor level where the catalog is available.
Hash
Hash functions — MD5, SHA256, generic HASH.
Interval
Interval constructor functions.
Fields
§
op: IntervalOpBlob
Blob functions — ENCODE, DECODE, OCTET_LENGTH.
Union
Union functions — UNION_VALUE, UNION_TAG, UNION_EXTRACT.
Trait Implementations§
Source§impl Clone for ScalarFunction
impl Clone for ScalarFunction
Source§fn clone(&self) -> ScalarFunction
fn clone(&self) -> ScalarFunction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ScalarFunction
impl !UnwindSafe for ScalarFunction
impl Freeze for ScalarFunction
impl Send for ScalarFunction
impl Sync for ScalarFunction
impl Unpin for ScalarFunction
impl UnsafeUnpin for ScalarFunction
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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