Skip to main content

Plan

Enum Plan 

Source
pub enum Plan {
    Bgp(Vec<TriplePattern>),
    Join(Box<Plan>, Box<Plan>),
    Union(Box<Plan>, Box<Plan>),
    LeftJoin(Box<Plan>, Box<Plan>, Option<FExpr>),
    Filter(FExpr, Box<Plan>),
    Extend(String, FExpr, Box<Plan>),
    Path(PatternTerm, PathAst, PatternTerm),
    Values(Vec<String>, Vec<Vec<Option<String>>>),
    Minus(Box<Plan>, Box<Plan>),
    Graph(GraphTarget, Box<Plan>),
    Subquery(Box<Select>),
    Service {
        silent: bool,
        endpoint: String,
        vars: Vec<String>,
        query: String,
    },
}
Expand description

A SPARQL graph-pattern evaluation plan (the supported algebra subset).

Variants§

§

Bgp(Vec<TriplePattern>)

Basic graph pattern: triple patterns joined on shared variables.

§

Join(Box<Plan>, Box<Plan>)

Conjunction of two patterns (inner join on shared variables).

§

Union(Box<Plan>, Box<Plan>)

UNION: all solutions of either side.

§

LeftJoin(Box<Plan>, Box<Plan>, Option<FExpr>)

OPTIONAL (left join): left solutions, extended by the right where it matches (and passes the optional condition), kept as-is where it doesn’t.

§

Filter(FExpr, Box<Plan>)

FILTER over an inner pattern.

§

Extend(String, FExpr, Box<Plan>)

In-pattern BIND(expr AS ?var): each inner solution extended with ?var (left unbound where expr errors). Distinct from the projection-time alias list (Select::extends) — this one is inside the graph pattern, so a following FILTER or join sees the bound variable.

§

Path(PatternTerm, PathAst, PatternTerm)

A property path subject <path> object.

§

Values(Vec<String>, Vec<Vec<Option<String>>>)

Inline VALUES: variable names and rows of optional ground-term tokens (None = UNDEF).

§

Minus(Box<Plan>, Box<Plan>)

MINUS: left solutions, minus those compatible with a right solution that shares at least one bound variable.

§

Graph(GraphTarget, Box<Plan>)

GRAPH <iri>|?g { … } — evaluate the inner pattern against a named graph.

§

Subquery(Box<Select>)

A nested SELECT subquery: evaluated independently to its projected solutions, which then join with the surrounding pattern on shared variables (only the subquery’s projected variables are visible outside).

§

Service

SERVICE [SILENT] <endpoint> { … } — SPARQL 1.1 federated query. The inner pattern is shipped (as query, its re-serialized SPARQL text) to the remote endpoint through the file’s attached ServiceClient at evaluation time; the returned solutions join the surrounding pattern on shared variables like any other operand. Under silent, a failed call degrades to one empty solution (per the spec); otherwise it fails the whole query.

Fields

§silent: bool
§endpoint: String

The endpoint IRI (no angle brackets) — where the sub-query is sent.

§vars: Vec<String>

Variables the inner pattern can bind (an over-approximation is fine: unreturned variables just stay unbound).

§query: String

The inner pattern as a standalone SELECT, exactly what is sent.

Trait Implementations§

Source§

impl Clone for Plan

Source§

fn clone(&self) -> Plan

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 Plan

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Plan

§

impl RefUnwindSafe for Plan

§

impl Send for Plan

§

impl Sync for Plan

§

impl Unpin for Plan

§

impl UnsafeUnpin for Plan

§

impl UnwindSafe for Plan

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

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 = !

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