Skip to main content

Predicate

Enum Predicate 

Source
pub enum Predicate {
Show 14 variants LogicalIdEq(String), KindEq(String), JsonPathEq { path: String, value: ScalarValue, }, JsonPathCompare { path: String, op: ComparisonOp, value: ScalarValue, }, SourceRefEq(String), ContentRefNotNull, ContentRefEq(String), JsonPathFusedEq { path: String, value: String, }, JsonPathFusedTimestampCmp { path: String, op: ComparisonOp, value: i64, }, JsonPathFusedBoolEq { path: String, value: bool, }, EdgePropertyEq { path: String, value: ScalarValue, }, EdgePropertyCompare { path: String, op: ComparisonOp, value: ScalarValue, }, JsonPathFusedIn { path: String, values: Vec<String>, }, JsonPathIn { path: String, values: Vec<ScalarValue>, },
}
Expand description

A filter predicate applied to candidate nodes.

Variants§

§

LogicalIdEq(String)

Match nodes with the exact logical ID.

§

KindEq(String)

Match nodes with the exact kind.

§

JsonPathEq

Equality check on a JSON property at the given path.

Fields

§path: String

JSON path expression (e.g. $.status).

§value: ScalarValue

Value to compare against.

§

JsonPathCompare

Ordered comparison on a JSON property at the given path.

Fields

§path: String

JSON path expression.

§op: ComparisonOp

Comparison operator.

§value: ScalarValue

Value to compare against.

§

SourceRefEq(String)

Match nodes with the exact source_ref.

§

ContentRefNotNull

Match nodes where content_ref is not NULL (i.e. content proxy nodes).

§

ContentRefEq(String)

Match nodes with the exact content_ref URI.

§

JsonPathFusedEq

Fused equality check on a JSON text property at the given path.

Unlike Predicate::JsonPathEq, this variant is classified as fusable by crate::fusion::is_fusable and is pushed into the search CTE’s inner WHERE clause so the CTE LIMIT applies after the predicate runs. The caller opts into fusion by registering an FTS property schema that covers the path; the tethered builder enforces that gate at filter-add time.

Fields

§path: String

JSON path expression (e.g. $.status).

§value: String

Text value to compare against.

§

JsonPathFusedTimestampCmp

Fused ordered comparison on a JSON integer/timestamp property at the given path. See Predicate::JsonPathFusedEq for the fusion contract.

Fields

§path: String

JSON path expression.

§op: ComparisonOp

Comparison operator.

§value: i64

Integer value to compare against (epoch seconds for timestamp semantics).

§

JsonPathFusedBoolEq

Fused equality check on a JSON boolean property at the given path. See Predicate::JsonPathFusedEq for the fusion contract. The boolean is stored as SQLite integer 1/0.

Fields

§path: String

JSON path expression (e.g. $.resolved).

§value: bool

Boolean value to compare against (stored as 1 or 0).

§

EdgePropertyEq

Equality check on a JSON property of the traversed edge at the given path.

Structurally identical to Predicate::JsonPathEq but targets e.properties on the edge row rather than n.properties on the target node. Only valid inside an expansion slot’s edge_filter.

Fields

§path: String

JSON path expression (e.g. $.rel).

§value: ScalarValue

Value to compare against.

§

EdgePropertyCompare

Ordered comparison on a JSON property of the traversed edge at the given path.

Structurally identical to Predicate::JsonPathCompare but targets e.properties on the edge row rather than n.properties on the target node. Only valid inside an expansion slot’s edge_filter.

Fields

§path: String

JSON path expression.

§op: ComparisonOp

Comparison operator.

§value: ScalarValue

Value to compare against.

§

JsonPathFusedIn

Fused IN-set check on a JSON text property at the given path.

Like Predicate::JsonPathFusedEq, this variant is classified as fusable and is pushed into the search CTE’s inner WHERE clause. The caller must have a registered FTS property schema for the path.

Fields

§path: String

JSON path expression (e.g. $.status).

§values: Vec<String>

Non-empty set of text values; the node must match at least one.

§

JsonPathIn

IN-set check on a JSON property at the given path.

Unlike Predicate::JsonPathFusedIn, this variant is not fusable and is applied as a residual WHERE clause on the Nodes driver scan.

Fields

§path: String

JSON path expression (e.g. $.category).

§values: Vec<ScalarValue>

Non-empty set of values; the node must match at least one.

Trait Implementations§

Source§

impl Clone for Predicate

Source§

fn clone(&self) -> Predicate

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Predicate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Predicate

Source§

fn eq(&self, other: &Predicate) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Predicate

Source§

impl StructuralPartialEq for Predicate

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.