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: NodeIdUpstream FilterInput (the FilterStart / prior link) — for input_schema.
rel: RelIdThe relationship slot to count (resolved from the subquery alias against the parent schema at build time).
not: boolNOT 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
impl Exists
pub fn new( input: NodeId, rel: RelId, parent_join_key: Vec<ColId>, not: bool, primary_key: &[ColId], ) -> Exists
Sourcepub fn begin(&self, g: &Graph)
pub fn begin(&self, g: &Graph)
beginFilter (exists.ts:71): just delegate downstream (the cache is reset
on end, not begin).
Sourcepub fn end(&self, g: &Graph)
pub fn end(&self, g: &Graph)
endFilter (exists.ts:75): reset the per-loop cache, then delegate.
Sourcepub fn filter(&self, g: &Graph, node: &Node<'_>) -> bool
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).
Sourcepub fn push_chain<'g>(
&'g self,
g: &'g Graph,
change: Change<'g>,
) -> Vec<Change<'g>>
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).