pub struct DslExpr(/* private fields */);Expand description
Typed traversal expression.
Implementations§
Source§impl DslExpr
impl DslExpr
Sourcepub fn src(field: impl Into<String>) -> Self
pub fn src(field: impl Into<String>) -> Self
Reads a field from the source node of the candidate edge.
Sourcepub fn dest(field: impl Into<String>) -> Self
pub fn dest(field: impl Into<String>) -> Self
Reads a field from the destination node of the candidate edge.
Sourcepub fn state(field: impl Into<String>) -> Self
pub fn state(field: impl Into<String>) -> Self
Reads a named value from the current path state.
pub fn null_lit() -> Self
pub fn bool_lit(value: bool) -> Self
pub fn int_lit(value: i64) -> Self
pub fn uint_lit(value: u64) -> Self
pub fn float_lit(value: f64) -> Self
pub fn string_lit(value: impl Into<Arc<str>>) -> Self
pub fn lit(value: impl Into<Value>) -> Self
Sourcepub fn when(predicate: Self, truthy: Self, falsy: Self) -> Self
pub fn when(predicate: Self, truthy: Self, falsy: Self) -> Self
Returns truthy when predicate is true, otherwise falsy.
Sourcepub fn from_polars_json(json: &str) -> Result<Self>
pub fn from_polars_json(json: &str) -> Result<Self>
Parses the supported Polars JSON expression subset.
pub fn and(self, rhs: Self) -> Self
pub fn or(self, rhs: Self) -> Self
pub fn eq(self, rhs: Self) -> Self
pub fn ne(self, rhs: Self) -> Self
pub fn lt(self, rhs: Self) -> Self
pub fn le(self, rhs: Self) -> Self
pub fn gt(self, rhs: Self) -> Self
pub fn ge(self, rhs: Self) -> Self
pub fn plus(self, rhs: Self) -> Self
pub fn minus(self, rhs: Self) -> Self
pub fn multiply(self, rhs: Self) -> Self
Sourcepub fn divide(self, rhs: Self) -> Self
pub fn divide(self, rhs: Self) -> Self
Numeric division. Always returns Value::F64.
pub fn modulo(self, rhs: Self) -> Self
pub fn bit_and(self, rhs: Self) -> Self
pub fn bit_or(self, rhs: Self) -> Self
pub fn bit_xor(self, rhs: Self) -> Self
Sourcepub fn mask_if_any(self, mask: Self, then_value: Self) -> Self
pub fn mask_if_any(self, mask: Self, then_value: Self) -> Self
Returns then_value when any bit in mask is set in self; otherwise
returns 0.
pub fn is_null(self) -> Self
pub fn is_not_null(self) -> Self
pub fn str_contains(self, needle: Self) -> Self
pub fn str_starts_with(self, prefix: Self) -> Self
pub fn str_ends_with(self, suffix: Self) -> Self
Sourcepub fn concat_list(values: impl IntoIterator<Item = Self>) -> Self
pub fn concat_list(values: impl IntoIterator<Item = Self>) -> Self
Concatenates list expressions, appending scalar expressions as single items.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DslExpr
impl RefUnwindSafe for DslExpr
impl Send for DslExpr
impl Sync for DslExpr
impl Unpin for DslExpr
impl UnsafeUnpin for DslExpr
impl UnwindSafe for DslExpr
Blanket Implementations§
impl<T> Allocation for T
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