Enum edn::query::UnifyVars [] [src]

pub enum UnifyVars {
    Implicit,
    Explicit(BTreeSet<Variable>),
}

Variants

Implicit means the variables in an or or not are derived from the enclosed pattern. DataScript regards these vars as 'free': these variables don't need to be bound by the enclosing environment.

Datomic's documentation implies that all implicit variables are required:

Datomic will attempt to push the or clause down until all necessary variables are bound, and will throw an exception if that is not possible.

but that would render top-level or expressions (as used in Datomic's own examples!) impossible, so we assume that this is an error in the documentation.

All contained 'arms' in an or with implicit variables must bind the same vars.

Explicit means the variables in an or-join or not-join are explicitly listed, specified with required-vars syntax.

DataScript parses these as free, but allows (incorrectly) the use of more complicated rule-vars syntax.

Only the named variables will be unified with the enclosing query.

Every 'arm' in an or-join must mention the entire set of explicit vars.

Trait Implementations

impl Clone for UnifyVars
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for UnifyVars
[src]

Formats the value using the given formatter. Read more

impl Eq for UnifyVars
[src]

impl PartialEq for UnifyVars
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl !Send for UnifyVars

impl !Sync for UnifyVars