Part 1: maintain 'with' variables in AlgebrizedQuery.
This commit is contained in:
parent
5f79932361
commit
5db0870209
1 changed files with 5 additions and 0 deletions
|
@ -14,6 +14,8 @@ extern crate error_chain;
|
||||||
extern crate mentat_core;
|
extern crate mentat_core;
|
||||||
extern crate mentat_query;
|
extern crate mentat_query;
|
||||||
|
|
||||||
|
use std::collections::BTreeSet;
|
||||||
|
|
||||||
mod errors;
|
mod errors;
|
||||||
mod types;
|
mod types;
|
||||||
mod validate;
|
mod validate;
|
||||||
|
@ -29,6 +31,7 @@ use mentat_query::{
|
||||||
FindQuery,
|
FindQuery,
|
||||||
FindSpec,
|
FindSpec,
|
||||||
SrcVar,
|
SrcVar,
|
||||||
|
Variable,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub use errors::{
|
pub use errors::{
|
||||||
|
@ -41,6 +44,7 @@ pub use errors::{
|
||||||
pub struct AlgebraicQuery {
|
pub struct AlgebraicQuery {
|
||||||
default_source: SrcVar,
|
default_source: SrcVar,
|
||||||
pub find_spec: FindSpec,
|
pub find_spec: FindSpec,
|
||||||
|
pub with: BTreeSet<Variable>,
|
||||||
has_aggregates: bool,
|
has_aggregates: bool,
|
||||||
pub limit: Option<u64>,
|
pub limit: Option<u64>,
|
||||||
pub cc: clauses::ConjoiningClauses,
|
pub cc: clauses::ConjoiningClauses,
|
||||||
|
@ -96,6 +100,7 @@ pub fn algebrize_with_cc(schema: &Schema, parsed: FindQuery, mut cc: ConjoiningC
|
||||||
default_source: parsed.default_source,
|
default_source: parsed.default_source,
|
||||||
find_spec: parsed.find_spec,
|
find_spec: parsed.find_spec,
|
||||||
has_aggregates: false, // TODO: we don't parse them yet.
|
has_aggregates: false, // TODO: we don't parse them yet.
|
||||||
|
with: parsed.with.into_iter().collect(),
|
||||||
limit: limit,
|
limit: limit,
|
||||||
cc: cc,
|
cc: cc,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue