Pre: Remove query/ crate

This commit is contained in:
Grisha Kruglov 2018-08-08 11:23:07 -07:00 committed by Grisha Kruglov
parent 11aaa193f5
commit 07beb68c7a
46 changed files with 69 additions and 111 deletions

View file

@ -58,9 +58,6 @@ path = "db"
[dependencies.db_traits] [dependencies.db_traits]
path = "db-traits" path = "db-traits"
[dependencies.mentat_query]
path = "query"
[dependencies.mentat_query_algebrizer] [dependencies.mentat_query_algebrizer]
path = "query-algebrizer" path = "query-algebrizer"

View file

@ -7,14 +7,14 @@ workspace = ".."
failure = "0.1.1" failure = "0.1.1"
failure_derive = "0.1.1" failure_derive = "0.1.1"
[dependencies.edn]
path = "../edn"
[dependencies.mentat_core] [dependencies.mentat_core]
path = "../core" path = "../core"
[dependencies.core_traits] [dependencies.core_traits]
path = "../core-traits" path = "../core-traits"
[dependencies.mentat_query]
path = "../query"
[dev-dependencies] [dev-dependencies]
itertools = "0.7" itertools = "0.7"

View file

@ -20,7 +20,7 @@ use mentat_core::{
ValueTypeSet, ValueTypeSet,
}; };
use mentat_query::{ use edn::query::{
FnArg, FnArg,
NonIntegerConstant, NonIntegerConstant,
Variable, Variable,

View file

@ -19,7 +19,7 @@ use mentat_core::{
use mentat_core::util::Either; use mentat_core::util::Either;
use mentat_query::{ use edn::query::{
Binding, Binding,
FnArg, FnArg,
NonIntegerConstant, NonIntegerConstant,
@ -273,7 +273,7 @@ mod testing {
Schema, Schema,
}; };
use mentat_query::{ use edn::query::{
Binding, Binding,
FnArg, FnArg,
Keyword, Keyword,

View file

@ -18,7 +18,7 @@ use mentat_core::{
ValueTypeSet, ValueTypeSet,
}; };
use mentat_query::{ use edn::query::{
Binding, Binding,
FnArg, FnArg,
Variable, Variable,
@ -332,7 +332,7 @@ mod testing {
Attribute, Attribute,
}; };
use mentat_query::{ use edn::query::{
Binding, Binding,
FnArg, FnArg,
Keyword, Keyword,

View file

@ -15,7 +15,7 @@ use core_traits::{
TypedValue, TypedValue,
}; };
use mentat_query::{ use edn::query::{
Variable, Variable,
}; };

View file

@ -42,16 +42,13 @@ use mentat_core::{
use mentat_core::counter::RcCounter; use mentat_core::counter::RcCounter;
use mentat_query::{ use edn::query::{
Element, Element,
FindSpec, FindSpec,
Keyword, Keyword,
Pull, Pull,
Variable, Variable,
WhereClause, WhereClause,
};
use mentat_query::{
PatternNonValuePlace, PatternNonValuePlace,
}; };

View file

@ -8,7 +8,7 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the // CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License. // specific language governing permissions and limitations under the License.
use mentat_query::{ use edn::query::{
ContainsVariables, ContainsVariables,
NotJoin, NotJoin,
UnifyVars, UnifyVars,
@ -101,7 +101,7 @@ mod testing {
ValueTypeSet, ValueTypeSet,
}; };
use mentat_query::{ use edn::query::{
Keyword, Keyword,
PlainSymbol, PlainSymbol,
Variable Variable

View file

@ -18,7 +18,7 @@ use mentat_core::{
ValueTypeSet, ValueTypeSet,
}; };
use mentat_query::{ use edn::query::{
OrJoin, OrJoin,
OrWhereClause, OrWhereClause,
Pattern, Pattern,
@ -763,7 +763,7 @@ mod testing {
Schema, Schema,
}; };
use mentat_query::{ use edn::query::{
Keyword, Keyword,
Variable, Variable,
}; };

View file

@ -20,7 +20,7 @@ use mentat_core::{
ValueTypeSet, ValueTypeSet,
}; };
use mentat_query::{ use edn::query::{
NonIntegerConstant, NonIntegerConstant,
Pattern, Pattern,
PatternValuePlace, PatternValuePlace,
@ -666,7 +666,7 @@ mod testing {
ValueTypeSet, ValueTypeSet,
}; };
use mentat_query::{ use edn::query::{
Keyword, Keyword,
Variable, Variable,
}; };

View file

@ -17,7 +17,7 @@ use mentat_core::{
ValueTypeSet, ValueTypeSet,
}; };
use mentat_query::{ use edn::query::{
FnArg, FnArg,
PlainSymbol, PlainSymbol,
Predicate, Predicate,
@ -199,7 +199,7 @@ mod testing {
Attribute, Attribute,
}; };
use mentat_query::{ use edn::query::{
FnArg, FnArg,
Keyword, Keyword,
Pattern, Pattern,

View file

@ -18,7 +18,7 @@ use mentat_core::{
Schema, Schema,
}; };
use mentat_query::{ use edn::query::{
FnArg, FnArg,
NonIntegerConstant, NonIntegerConstant,
PlainSymbol, PlainSymbol,

View file

@ -12,7 +12,7 @@ use core_traits::{
ValueType, ValueType,
}; };
use mentat_query::{ use edn::query::{
Binding, Binding,
FnArg, FnArg,
SrcVar, SrcVar,
@ -257,7 +257,7 @@ mod testing {
Schema, Schema,
}; };
use mentat_query::{ use edn::query::{
Binding, Binding,
FnArg, FnArg,
PlainSymbol, PlainSymbol,

View file

@ -8,7 +8,7 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the // CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License. // specific language governing permissions and limitations under the License.
use mentat_query::{ use edn::query::{
WhereFn, WhereFn,
}; };

View file

@ -8,8 +8,6 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the // CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License. // specific language governing permissions and limitations under the License.
extern crate mentat_query;
use std; // To refer to std::result::Result. use std; // To refer to std::result::Result.
use core_traits::{ use core_traits::{
@ -21,7 +19,7 @@ use mentat_core::{
ValueTypeSet, ValueTypeSet,
}; };
use self::mentat_query::{ use edn::query::{
PlainSymbol, PlainSymbol,
}; };

View file

@ -12,9 +12,9 @@ extern crate failure;
#[macro_use] extern crate failure_derive; #[macro_use] extern crate failure_derive;
extern crate edn;
extern crate mentat_core; extern crate mentat_core;
extern crate core_traits; extern crate core_traits;
extern crate mentat_query;
use std::collections::BTreeSet; use std::collections::BTreeSet;
use std::ops::Sub; use std::ops::Sub;
@ -40,7 +40,7 @@ use mentat_core::{
use mentat_core::counter::RcCounter; use mentat_core::counter::RcCounter;
use mentat_query::{ use edn::query::{
Element, Element,
FindSpec, FindSpec,
Limit, Limit,

View file

@ -25,7 +25,7 @@ use mentat_core::{
ValueTypeSet, ValueTypeSet,
}; };
use mentat_query::{ use edn::query::{
Direction, Direction,
FindSpec, FindSpec,
Keyword, Keyword,

View file

@ -10,7 +10,7 @@
use std::collections::BTreeSet; use std::collections::BTreeSet;
use mentat_query::{ use edn::query::{
ContainsVariables, ContainsVariables,
OrJoin, OrJoin,
NotJoin, NotJoin,
@ -95,9 +95,9 @@ pub(crate) fn validate_not_join(not_join: &NotJoin) -> Result<()> {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
extern crate mentat_core; extern crate mentat_core;
extern crate mentat_query; extern crate edn;
use self::mentat_query::{ use edn::query::{
Keyword, Keyword,
OrWhereClause, OrWhereClause,
Pattern, Pattern,

View file

@ -8,9 +8,9 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the // CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License. // specific language governing permissions and limitations under the License.
extern crate edn;
extern crate mentat_core; extern crate mentat_core;
extern crate core_traits; extern crate core_traits;
extern crate mentat_query;
extern crate mentat_query_algebrizer; extern crate mentat_query_algebrizer;
mod utils; mod utils;
@ -24,7 +24,7 @@ use mentat_core::{
Schema, Schema,
}; };
use mentat_query::{ use edn::query::{
Keyword, Keyword,
}; };

View file

@ -8,9 +8,9 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the // CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License. // specific language governing permissions and limitations under the License.
extern crate edn;
extern crate mentat_core; extern crate mentat_core;
extern crate core_traits; extern crate core_traits;
extern crate mentat_query;
extern crate mentat_query_algebrizer; extern crate mentat_query_algebrizer;
mod utils; mod utils;
@ -27,7 +27,7 @@ use mentat_core::{
Schema, Schema,
}; };
use mentat_query::{ use edn::query::{
Keyword, Keyword,
PlainSymbol, PlainSymbol,
Variable, Variable,

View file

@ -8,9 +8,9 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the // CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License. // specific language governing permissions and limitations under the License.
extern crate edn;
extern crate mentat_core; extern crate mentat_core;
extern crate core_traits; extern crate core_traits;
extern crate mentat_query;
extern crate mentat_query_algebrizer; extern crate mentat_query_algebrizer;
mod utils; mod utils;
@ -28,7 +28,7 @@ use mentat_core::{
ValueTypeSet, ValueTypeSet,
}; };
use mentat_query::{ use edn::query::{
Keyword, Keyword,
PlainSymbol, PlainSymbol,
Variable, Variable,

View file

@ -8,9 +8,9 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the // CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License. // specific language governing permissions and limitations under the License.
extern crate edn;
extern crate core_traits; extern crate core_traits;
extern crate mentat_core; extern crate mentat_core;
extern crate mentat_query;
extern crate mentat_query_algebrizer; extern crate mentat_query_algebrizer;
mod utils; mod utils;

View file

@ -23,7 +23,7 @@ use mentat_core::{
Schema, Schema,
}; };
use mentat_query::{ use edn::query::{
Keyword, Keyword,
}; };

View file

@ -15,6 +15,9 @@ features = ["limits"]
[dependencies.core_traits] [dependencies.core_traits]
path = "../core-traits" path = "../core-traits"
[dependencies.edn]
path = "../edn"
[dependencies.mentat_core] [dependencies.mentat_core]
path = "../core" path = "../core"
@ -27,9 +30,6 @@ path = "../db-traits"
[dependencies.mentat_sql] [dependencies.mentat_sql]
path = "../sql" path = "../sql"
[dependencies.mentat_query]
path = "../query"
[dependencies.mentat_query_algebrizer] [dependencies.mentat_query_algebrizer]
path = "../query-algebrizer" path = "../query-algebrizer"

View file

@ -16,7 +16,7 @@ use mentat_core::{
ValueTypeSet, ValueTypeSet,
}; };
use mentat_query::{ use edn::query::{
Aggregate, Aggregate,
QueryFunction, QueryFunction,
Variable, Variable,

View file

@ -16,7 +16,7 @@ use mentat_core::{
ValueTypeSet, ValueTypeSet,
}; };
use db_traits::errors::DbError; use db_traits::errors::DbError;
use mentat_query::{ use edn::query::{
PlainSymbol, PlainSymbol,
}; };
use query_pull_traits::errors::{ use query_pull_traits::errors::{

View file

@ -15,11 +15,11 @@ extern crate failure_derive;
extern crate indexmap; extern crate indexmap;
extern crate rusqlite; extern crate rusqlite;
extern crate edn;
extern crate mentat_core; extern crate mentat_core;
extern crate db_traits; extern crate db_traits;
extern crate core_traits; extern crate core_traits;
extern crate mentat_db; // For value conversion. extern crate mentat_db; // For value conversion.
extern crate mentat_query;
extern crate mentat_query_algebrizer; extern crate mentat_query_algebrizer;
extern crate mentat_query_pull; extern crate mentat_query_pull;
extern crate query_pull_traits; extern crate query_pull_traits;
@ -58,7 +58,7 @@ use mentat_db::{
TypedSQLValue, TypedSQLValue,
}; };
use mentat_query::{ use edn::query::{
Element, Element,
FindSpec, FindSpec,
Limit, Limit,

View file

@ -26,7 +26,7 @@ use mentat_core::util::{
Either, Either,
}; };
use mentat_query::{ use edn::query::{
Element, Element,
Pull, Pull,
Variable, Variable,

View file

@ -25,7 +25,7 @@ use mentat_core::{
ValueRc, ValueRc,
}; };
use mentat_query::{ use edn::query::{
PullAttributeSpec, PullAttributeSpec,
}; };

View file

@ -8,9 +8,9 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the // CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License. // specific language governing permissions and limitations under the License.
extern crate edn;
extern crate mentat_core; extern crate mentat_core;
extern crate core_traits; extern crate core_traits;
extern crate mentat_query;
extern crate mentat_query_algebrizer; extern crate mentat_query_algebrizer;
extern crate mentat_query_projector; extern crate mentat_query_projector;
@ -24,7 +24,7 @@ use mentat_core::{
Schema, Schema,
}; };
use mentat_query::{ use edn::query::{
Keyword, Keyword,
}; };

View file

@ -13,6 +13,9 @@ path = "../query-pull-traits"
version = "0.13" version = "0.13"
features = ["limits"] features = ["limits"]
[dependencies.edn]
path = "../edn"
[dependencies.mentat_core] [dependencies.mentat_core]
path = "../core" path = "../core"
@ -25,9 +28,6 @@ path = "../db"
[dependencies.db_traits] [dependencies.db_traits]
path = "../db-traits" path = "../db-traits"
[dependencies.mentat_query]
path = "../query"
[dependencies.mentat_query_algebrizer] [dependencies.mentat_query_algebrizer]
path = "../query-algebrizer" path = "../query-algebrizer"

View file

@ -60,11 +60,11 @@
extern crate failure; extern crate failure;
extern crate rusqlite; extern crate rusqlite;
extern crate edn;
extern crate mentat_core; extern crate mentat_core;
extern crate core_traits; extern crate core_traits;
extern crate mentat_db; extern crate mentat_db;
extern crate db_traits; extern crate db_traits;
extern crate mentat_query;
extern crate query_pull_traits; extern crate query_pull_traits;
extern crate mentat_query_algebrizer; extern crate mentat_query_algebrizer;
extern crate mentat_query_sql; extern crate mentat_query_sql;
@ -96,7 +96,7 @@ use mentat_core::{
use mentat_db::cache; use mentat_db::cache;
use mentat_query::{ use edn::query::{
NamedPullAttribute, NamedPullAttribute,
PullAttributeSpec, PullAttributeSpec,
PullConcreteAttribute, PullConcreteAttribute,

View file

@ -5,6 +5,9 @@ workspace = ".."
[dependencies] [dependencies]
[dependencies.edn]
path = "../edn"
[dependencies.core_traits] [dependencies.core_traits]
path = "../core-traits" path = "../core-traits"
@ -14,8 +17,5 @@ path = "../core"
[dependencies.mentat_sql] [dependencies.mentat_sql]
path = "../sql" path = "../sql"
[dependencies.mentat_query]
path = "../query"
[dependencies.mentat_query_algebrizer] [dependencies.mentat_query_algebrizer]
path = "../query-algebrizer" path = "../query-algebrizer"

View file

@ -10,7 +10,7 @@
#[macro_use] extern crate mentat_core; #[macro_use] extern crate mentat_core;
extern crate core_traits; extern crate core_traits;
extern crate mentat_query; extern crate edn;
extern crate mentat_query_algebrizer; extern crate mentat_query_algebrizer;
extern crate mentat_sql; extern crate mentat_sql;
@ -26,7 +26,7 @@ use mentat_core::{
SQLTypeAffinity, SQLTypeAffinity,
}; };
use mentat_query::{ use edn::query::{
Direction, Direction,
Limit, Limit,
Variable, Variable,

View file

@ -7,6 +7,9 @@ workspace = ".."
failure = "0.1.1" failure = "0.1.1"
failure_derive = "0.1.1" failure_derive = "0.1.1"
[dependencies.edn]
path = "../edn"
[dependencies.mentat_core] [dependencies.mentat_core]
path = "../core" path = "../core"
@ -16,9 +19,6 @@ path = "../core-traits"
[dependencies.mentat_sql] [dependencies.mentat_sql]
path = "../sql" path = "../sql"
[dependencies.mentat_query]
path = "../query"
[dependencies.mentat_query_algebrizer] [dependencies.mentat_query_algebrizer]
path = "../query-algebrizer" path = "../query-algebrizer"

View file

@ -10,9 +10,9 @@
extern crate failure; extern crate failure;
extern crate edn;
extern crate core_traits; extern crate core_traits;
extern crate mentat_core; extern crate mentat_core;
extern crate mentat_query;
extern crate mentat_query_algebrizer; extern crate mentat_query_algebrizer;
extern crate mentat_query_projector; extern crate mentat_query_projector;
extern crate mentat_query_sql; extern crate mentat_query_sql;

View file

@ -26,7 +26,7 @@ use mentat_core::util::{
Either, Either,
}; };
use mentat_query::{ use edn::query::{
Limit, Limit,
}; };

View file

@ -8,9 +8,9 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the // CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License. // specific language governing permissions and limitations under the License.
extern crate edn;
extern crate mentat_core; extern crate mentat_core;
extern crate core_traits; extern crate core_traits;
extern crate mentat_query;
extern crate mentat_query_algebrizer; extern crate mentat_query_algebrizer;
extern crate mentat_query_projector; extern crate mentat_query_projector;
extern crate mentat_query_translator; extern crate mentat_query_translator;
@ -20,7 +20,7 @@ use std::collections::BTreeMap;
use std::rc::Rc; use std::rc::Rc;
use mentat_query::{ use edn::query::{
FindSpec, FindSpec,
Keyword, Keyword,
Variable, Variable,

View file

@ -1,12 +0,0 @@
[package]
name = "mentat_query"
version = "0.0.1"
workspace = ".."
[dependencies]
[dependencies.edn]
path = "../edn"
[dependencies.mentat_core]
path = "../core"

View file

@ -1,4 +0,0 @@
This sub-crate implements the core types used by the query parser,
translator, and executor — variables, find specifications, etc.
The `edn` sub-crate implements some even lower-level types, such as `Keyword`.

View file

@ -1,12 +0,0 @@
// Copyright 2016 Mozilla
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use
// this file except in compliance with the License. You may obtain a copy of the
// License at http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software distributed
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
extern crate edn;
pub use edn::query::*;

View file

@ -27,7 +27,6 @@ use mentat_core::{
}; };
use db_traits::errors::DbError; use db_traits::errors::DbError;
use mentat_query;
use mentat_query_algebrizer; use mentat_query_algebrizer;
use mentat_query_projector; use mentat_query_projector;
use query_pull_traits::errors::{ use query_pull_traits::errors::{
@ -80,7 +79,7 @@ pub enum MentatError {
UnexpectedLostTransactRace, UnexpectedLostTransactRace,
#[fail(display = "missing core attribute {}", _0)] #[fail(display = "missing core attribute {}", _0)]
MissingCoreVocabulary(mentat_query::Keyword), MissingCoreVocabulary(edn::query::Keyword),
#[fail(display = "schema changed since query was prepared")] #[fail(display = "schema changed since query was prepared")]
PreparedQuerySchemaMismatch, PreparedQuerySchemaMismatch,

View file

@ -26,7 +26,6 @@ extern crate mentat_core;
extern crate core_traits; extern crate core_traits;
extern crate mentat_db; extern crate mentat_db;
extern crate db_traits; extern crate db_traits;
extern crate mentat_query;
extern crate mentat_query_algebrizer; extern crate mentat_query_algebrizer;
extern crate mentat_query_projector; extern crate mentat_query_projector;
extern crate mentat_query_pull; extern crate mentat_query_pull;
@ -58,7 +57,7 @@ pub use mentat_core::{
Uuid, Uuid,
}; };
pub use mentat_query::{ pub use edn::query::{
FindSpec, FindSpec,
}; };

View file

@ -37,13 +37,13 @@ pub use mentat_query_algebrizer::{
QueryInputs, QueryInputs,
}; };
pub use mentat_query::{ pub use edn::query::{
Keyword, Keyword,
PlainSymbol, PlainSymbol,
Variable, Variable,
}; };
use mentat_query::{ use edn::query::{
Element, Element,
FindSpec, FindSpec,
Pattern, Pattern,

View file

@ -43,9 +43,6 @@ default-features = false
[dependencies.edn] [dependencies.edn]
path = "../../edn" path = "../../edn"
[dependencies.mentat_query]
path = "../../query"
[dependencies.core_traits] [dependencies.core_traits]
path = "../../core-traits" path = "../../core-traits"

View file

@ -30,7 +30,6 @@ extern crate time;
extern crate mentat; extern crate mentat;
extern crate edn; extern crate edn;
extern crate mentat_query;
extern crate core_traits; extern crate core_traits;
extern crate mentat_db; extern crate mentat_db;