Rindle docs and package mapSkip to main content

Exists

Struct Exists 

Source
pub struct Exists {
    pub input: NodeId,
    pub rel: RelId,
    pub not: bool,
    pub parent_join_key: Vec<ColId>,
    pub output: Cell<Option<NodeId>>,
    /* private fields */
}
Expand description

Exists: a relationship-size gate in the where filter sub-graph.

Fields§

§input: NodeId

Upstream FilterInput (the FilterStart / prior link) — for input_schema.

§rel: RelId

The relationship slot to count (resolved from the subquery alias against the parent schema at build time).

§not: bool

NOT EXISTS.

§parent_join_key: Vec<ColId>

The parent-join-key columns — the cache key (condition.parentField).

§output: Cell<Option<NodeId>>

The downstream FilterOutput chain link (wired late via Graph::set_output).

Implementations§

Source§

impl Exists

Source

pub fn new( input: NodeId, rel: RelId, parent_join_key: Vec<ColId>, not: bool, primary_key: &[ColId], ) -> Exists

Source

pub fn begin(&self, g: &Graph)

beginFilter (exists.ts:71): just delegate downstream (the cache is reset on end, not begin).

Source

pub fn end(&self, g: &Graph)

endFilter (exists.ts:75): reset the per-loop cache, then delegate.

Source

pub fn filter(&self, g: &Graph, node: &Node<'_>) -> bool

filter(node) (exists.ts:80): the epoch-gated cache lookup, then #filter(node) && output.filter(node).

Source

pub fn push_chain<'g>( &'g self, g: &'g Graph, change: Change<'g>, ) -> Vec<Change<'g>>

push (exists.ts:109). Add/Edit/Remove of the parent cannot change the child relationship’s size → #pushWithFilter. A Child Add/Remove to this relationship can flip membership → refetch the size and either pass it through filtered or convert it into a parent Add/Remove. Returns the change(s) to forward (the chassis bubbles them up; a terminal FilterEnd consumes them).

Auto Trait Implementations§

§

impl !Freeze for Exists

§

impl !RefUnwindSafe for Exists

§

impl Send for Exists

§

impl !Sync for Exists

§

impl Unpin for Exists

§

impl UnsafeUnpin for Exists

§

impl UnwindSafe for Exists

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