Skip to main content

GraphStats

Struct GraphStats 

Source
pub struct GraphStats<'a> { /* private fields */ }
Expand description

Construction goes through GraphStats::new (the ADR-0218 one- construction idiom the sibling plan-time stats impls use), so an inline build cannot drift from it.

Implementations§

Source§

impl<'a> GraphStats<'a>

Source

pub fn new( graph: &'a Graph, params: &'a BTreeMap<String, Value>, ) -> GraphStats<'a>

The one construction: the connection’s graph and the statement’s parameters.

Trait Implementations§

Source§

impl PatternStats for GraphStats<'_>

Source§

fn range_rows( &self, (label, label_token): &NamedToken, property: &NamedToken, op: BinaryOp, bound: &Expr, ) -> Option<u64>

ADR-0486: the range window’s posting-length count, delegated to Graph::pattern_range_rows — the same range_seek_cardinality the executor’s own seek cardinality reads, so the ladder’s price and the runtime funnel decline together. The bound resolves the equality_rows way: literals and parameters only, None for anything else (a temporal literal’s function call included — the funnel’s eval-resolved bound is the runtime’s, not the plan-time estimate’s).

Source§

fn contains_rows( &self, (label, label_token): &NamedToken, property: &NamedToken, needle: &Expr, ) -> Option<ContainsCount>

LABS-643: the count is always measurable — the TEXT index’s exact answer, or without one the sampled estimate (Graph::pattern_contains_rows) — so only a non-string needle stays unmeasured (None, the ladder’s fallback). The provenance stays typed in ContainsCount; the planner compounds the sampled form’s scan floor on its one scale (ADR-0474). The sample rides the name-keyed store path like range_rows; an Absent label is the measurable zero the by-name path answers for a label never interned.

Source§

fn degree_tail(&self, label: &NamedToken, rel_type: &NamedToken) -> Option<u64>

LABS-351: the live graph’s histogram tail (the executor keeps the real one; the null stats default None).

Source§

fn any_degree_tail(&self, rel_type: Option<&SmallName>) -> Option<u64>

LABS-991: the live histograms’ any-label tail.

Source§

fn label_rows(&self, (name, token): &NamedToken) -> Option<u64>

Nodes carrying label.
Source§

fn equality_rows( &self, (label, label_token): &NamedToken, property: &NamedToken, value: &Expr, ) -> Option<u64>

Hits of an equality seek on a RANGE index for (label, property). value is the raw predicate expression. Implementors resolve literals and parameters with Expr::seek_value and return None for anything else. None also means no RANGE index, not zero hits.
Source§

fn rel_type_rows(&self, (name, token): &NamedToken) -> Option<u64>

Relationships of rel_type.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for GraphStats<'a>

§

impl<'a> !UnwindSafe for GraphStats<'a>

§

impl<'a> Forget for GraphStats<'a>

§

impl<'a> Freeze for GraphStats<'a>

§

impl<'a> Move for GraphStats<'a>

§

impl<'a> Send for GraphStats<'a>

§

impl<'a> Sync for GraphStats<'a>

§

impl<'a> Unpin for GraphStats<'a>

§

impl<'a> UnsafeUnpin for GraphStats<'a>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V