Skip to main content

FilterTerm

Enum FilterTerm 

Source
pub enum FilterTerm {
    SourceType(String),
    Kind(String),
    CreatedAfter(i64),
    Status(String),
    Json(Predicate),
}
Expand description

0.8.11 Slice 40 (#17) — a single closed FilterTerm of the unified filter grammar (ADR-0.8.11-filter-grammar-unification, Option A; closes reserved-gap 37). Exactly five variants: the four G10 shorthand metadata fields (SourceType/Kind/CreatedAfter/Status) plus the general G4 json-path Predicate (Json). The shorthand fields are dedicated typed variants — NOT Json(Predicate) over $.source_type etc. — precisely so the vec0 search backend can lower them to the indexed pre-KNN metadata columns while typed-rejecting an arbitrary Json term (D3: no demotion to post-KNN json_extract).

The grammar stays closed (inherits ADR-0.8.0 D-F1/D-F2/D-F4/D-F5): no DSL, no caller SQL, no JsonPathFused*, no *_unchecked, no OR/nesting (implicit AND only); Json terms are built ONLY via the validated Predicate::json_path_eq / Predicate::json_path_compare constructors (path allowlist enforced at construction). The shipped ScalarValue / ComparisonOp / Predicate vocabulary is reused verbatim — no new grammar.

Variants§

§

SourceType(String)

vec0 partition-key metadata column source_type (pre-KNN). On read.list it constant-folds against resolve_source_type(kind) (the column does not exist in canonical_nodes).

§

Kind(String)

kind — the vec0 metadata column (pre-KNN). On read.list it constant-folds against the partition kind argument (D1 impl decision: constant-fold, the simpler total option vs a redundant column clause).

§

CreatedAfter(i64)

created_at >= bound (unix seconds). vec0 metadata column (pre-KNN); lowers to json_extract(body,'$.created_at') >= ? on read.list.

§

Status(String)

vec0 metadata column status (pre-KNN); lowers to json_extract(body,'$.status') = ? on read.list.

§

Json(Predicate)

The general G4 json-path predicate (unchanged shipped grammar). Resolves only on the read.list (canonical_nodes) backend; typed-rejected on search_filtered because it would require a post-KNN json_extract that defeats the indexed pre-KNN filter (D3 no-demotion guarantee).

Trait Implementations§

Source§

impl Clone for FilterTerm

Source§

fn clone(&self) -> FilterTerm

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for FilterTerm

Source§

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

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

impl PartialEq for FilterTerm

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FilterTerm

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> Same for T

Source§

type Output = T

Should always be Self
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.