Struct mentat_query_algebrizer::ConjoiningClauses [] [src]

pub struct ConjoiningClauses {
    pub empty_because: Option<EmptyBecause>,
    pub from: Vec<SourceAlias>,
    pub computed_tables: Vec<ComputedTable>,
    pub wheres: ColumnIntersection,
    pub column_bindings: BTreeMap<Variable, Vec<QualifiedAlias>>,
    pub input_variables: BTreeSet<Variable>,
    pub known_types: BTreeMap<Variable, ValueTypeSet>,
    pub extracted_types: BTreeMap<Variable, QualifiedAlias>,
    // some fields omitted
}

A ConjoiningClauses (CC) is a collection of clauses that are combined with JOIN. The topmost form in a query is a ConjoiningClauses.

Not yet done:


Fields

Some if this set of clauses cannot yield results in the context of the current schema.

A vector of source/alias pairs used to construct a SQL FROM list.

A vector of computed tables (typically subqueries). The index into this vector is used as an identifier in a DatomsTable::Computed(c) table reference.

A list of fragments that can be joined by AND.

A map from var to qualified columns. Used to project.

A list of variables mentioned in the enclosing query's :in clause. These must all be bound before the query can be executed. TODO: clarify what this means for nested CCs.

A map from var to type. Whenever a var maps unambiguously to two different types, it cannot yield results, so we don't represent that case here. If a var isn't present in the map, it means that its type is not known in advance. Usually that state should be represented by ValueTypeSet::Any.

A mapping, similar to column_bindings, but used to pull type tags out of the store at runtime. If a var isn't unit in known_types, it should be present here.

Methods

impl ConjoiningClauses
[src]

[src]

Be careful with this. It'll overwrite existing bindings.

[src]

[src]

[src]

[src]

Return an iterator over the variables externally bound to values.

[src]

Return a set of the variables externally bound to values.

[src]

Return a single ValueType if the given variable is known to have a precise type. Returns None if the type of the variable is unknown. Returns None if the type of the variable is known but not precise -- "double or integer" isn't good enough.

[src]

[src]

Trait Implementations

impl PartialEq for ConjoiningClauses
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl Eq for ConjoiningClauses
[src]

impl Debug for ConjoiningClauses
[src]

[src]

Formats the value using the given formatter. Read more

impl Default for ConjoiningClauses
[src]

Basics.

[src]

Returns the "default value" for a type. Read more