pub struct Func {
pub name: &'static str,
pub args: Vec<Expr>,
pub distinct: bool,
}Expand description
A function call.
Fields§
§name: &'static strThe function name, written verbatim.
args: Vec<Expr>The arguments.
distinct: boolWhether DISTINCT applies to the first argument, as in aggregates.
Implementations§
Source§impl Func
impl Func
Sourcepub fn call(name: &'static str, args: impl IntoIterator<Item = Expr>) -> Expr
pub fn call(name: &'static str, args: impl IntoIterator<Item = Expr>) -> Expr
Builds a call to any function.
The name is written verbatim, so this is the escape hatch for engine functions that have no dedicated constructor.
Sourcepub fn count_star() -> Expr
pub fn count_star() -> Expr
Builds COUNT(*).
Sourcepub fn count_distinct(expr: Expr) -> Expr
pub fn count_distinct(expr: Expr) -> Expr
Builds COUNT(DISTINCT expr).
Sourcepub fn coalesce(args: impl IntoIterator<Item = Expr>) -> Expr
pub fn coalesce(args: impl IntoIterator<Item = Expr>) -> Expr
Builds COALESCE(a, b, ...).
Sourcepub fn json_extract(json: Expr, path: impl Into<Value>) -> Expr
pub fn json_extract(json: Expr, path: impl Into<Value>) -> Expr
Builds json_extract(json, path), binding path as a parameter.
Sourcepub fn vector_distance_cos(a: Expr, b: Expr) -> Expr
pub fn vector_distance_cos(a: Expr, b: Expr) -> Expr
Builds vector_distance_cos(a, b) — Turso vector search.
Sourcepub fn vector_distance_l2(a: Expr, b: Expr) -> Expr
pub fn vector_distance_l2(a: Expr, b: Expr) -> Expr
Builds vector_distance_l2(a, b) — Turso vector search.
Trait Implementations§
impl StructuralPartialEq for Func
Auto Trait Implementations§
impl Freeze for Func
impl RefUnwindSafe for Func
impl Send for Func
impl Sync for Func
impl Unpin for Func
impl UnsafeUnpin for Func
impl UnwindSafe for Func
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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