parent
d4166cc67c
commit
e68cc4016c
20 changed files with 17 additions and 49 deletions
|
@ -70,9 +70,6 @@ path = "query-sql"
|
|||
[dependencies.mentat_query_translator]
|
||||
path = "query-translator"
|
||||
|
||||
[dependencies.mentat_tx]
|
||||
path = "tx"
|
||||
|
||||
[dependencies.mentat_tolstoy]
|
||||
path = "tolstoy"
|
||||
|
||||
|
|
|
@ -183,10 +183,6 @@ This crate defines the structs and enums that are the output of the query parser
|
|||
|
||||
Similarly, this crate defines an abstract representation of a SQL query as understood by Mentat. This bridges between Mentat's types (_e.g._, `TypedValue`) and SQL concepts (`ColumnOrExpression`, `GroupBy`). It's produced by the algebrizer and consumed by the translator.
|
||||
|
||||
#### `mentat_tx`
|
||||
|
||||
Mentat has two main inputs: reads (queries) and writes (transacts). Just as `mentat_query` defines the types produced by the query parser, `mentat_tx` defines the types produced by the tx parser.
|
||||
|
||||
### Query processing
|
||||
|
||||
#### `mentat_query_algebrizer`
|
||||
|
|
|
@ -27,9 +27,6 @@ path = "../core"
|
|||
[dependencies.mentat_sql]
|
||||
path = "../sql"
|
||||
|
||||
[dependencies.mentat_tx]
|
||||
path = "../tx"
|
||||
|
||||
# Should be dev-dependencies.
|
||||
[dependencies.tabwriter]
|
||||
version = "1.0.3"
|
||||
|
|
|
@ -16,7 +16,7 @@ use edn::types::Value;
|
|||
use edn::symbols;
|
||||
use entids;
|
||||
use db::TypedSQLValue;
|
||||
use mentat_tx::entities::Entity;
|
||||
use edn::entities::Entity;
|
||||
use mentat_core::{
|
||||
IdentMap,
|
||||
Schema,
|
||||
|
|
|
@ -97,7 +97,7 @@ use mentat_sql::{
|
|||
SQLQuery,
|
||||
};
|
||||
|
||||
use mentat_tx::entities::{
|
||||
use edn::entities::{
|
||||
OpType,
|
||||
};
|
||||
|
||||
|
|
|
@ -1096,7 +1096,7 @@ mod tests {
|
|||
InternSet,
|
||||
};
|
||||
use mentat_core::util::Either::*;
|
||||
use mentat_tx::entities::{
|
||||
use edn::entities::{
|
||||
OpType,
|
||||
TempId,
|
||||
};
|
||||
|
|
|
@ -31,7 +31,9 @@ use mentat_core::{
|
|||
TypedValue,
|
||||
ValueType,
|
||||
};
|
||||
use mentat_tx::entities::{Entid};
|
||||
use edn::entities::{
|
||||
Entid,
|
||||
};
|
||||
use schema::{
|
||||
SchemaBuilding,
|
||||
};
|
||||
|
|
|
@ -17,7 +17,7 @@ use std::collections::{
|
|||
|
||||
use rusqlite;
|
||||
|
||||
use mentat_tx::entities::{
|
||||
use edn::entities::{
|
||||
TempId,
|
||||
};
|
||||
use mentat_core::{
|
||||
|
|
|
@ -47,8 +47,8 @@ use types::{
|
|||
TypedValue,
|
||||
ValueType,
|
||||
};
|
||||
use mentat_tx::entities;
|
||||
use mentat_tx::entities::{
|
||||
use edn::entities;
|
||||
use edn::entities::{
|
||||
EntityPlace,
|
||||
OpType,
|
||||
TempId,
|
||||
|
|
|
@ -26,7 +26,6 @@ extern crate time;
|
|||
#[macro_use] extern crate edn;
|
||||
#[macro_use] extern crate mentat_core;
|
||||
extern crate mentat_sql;
|
||||
extern crate mentat_tx;
|
||||
|
||||
use std::iter::repeat;
|
||||
|
||||
|
|
|
@ -103,8 +103,8 @@ use mentat_core::{
|
|||
|
||||
use mentat_core::intern_set::InternSet;
|
||||
|
||||
use mentat_tx::entities as entmod;
|
||||
use mentat_tx::entities::{
|
||||
use edn::entities as entmod;
|
||||
use edn::entities::{
|
||||
AttributePlace,
|
||||
Entity,
|
||||
OpType,
|
||||
|
|
|
@ -32,7 +32,7 @@ use mentat_core::{
|
|||
TypedValue,
|
||||
};
|
||||
|
||||
use mentat_tx::entities::{
|
||||
use edn::entities::{
|
||||
OpType,
|
||||
};
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ pub use self::mentat_core::{
|
|||
ValueType,
|
||||
};
|
||||
|
||||
use mentat_tx::entities::{
|
||||
use edn::entities::{
|
||||
EntityPlace,
|
||||
TempId,
|
||||
};
|
||||
|
|
|
@ -45,7 +45,7 @@ use mentat_core::{
|
|||
Schema,
|
||||
TypedValue,
|
||||
};
|
||||
use mentat_tx::entities::OpType;
|
||||
use edn::entities::OpType;
|
||||
use schema::SchemaBuilding;
|
||||
|
||||
/// A "Simple upsert" that looks like [:db/add TEMPID a v], where a is :db.unique/identity.
|
||||
|
|
|
@ -23,7 +23,7 @@ use mentat_core::{
|
|||
TypedValue,
|
||||
};
|
||||
|
||||
use mentat_tx::entities::{
|
||||
use edn::entities::{
|
||||
OpType,
|
||||
};
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
// The internal data format for transacting is required to encode the complexities of
|
||||
// processing that format: temporary IDs, lookup refs, input spans, etc.
|
||||
//
|
||||
// See mentat_tx::entities::Entity and all of its child enums to see how complex this gets.
|
||||
// See edn::entities::Entity and all of its child enums to see how complex this gets.
|
||||
//
|
||||
// A programmatic consumer doesn't want to build something that looks like:
|
||||
//
|
||||
|
@ -75,7 +75,7 @@ use mentat_db::internal_types::{
|
|||
TypedValueOr,
|
||||
};
|
||||
|
||||
use mentat_tx::entities::{
|
||||
use edn::entities::{
|
||||
OpType,
|
||||
TempId,
|
||||
};
|
||||
|
|
|
@ -30,7 +30,6 @@ extern crate mentat_query_pull;
|
|||
extern crate mentat_query_translator;
|
||||
extern crate mentat_sql;
|
||||
extern crate mentat_tolstoy;
|
||||
extern crate mentat_tx;
|
||||
|
||||
pub use mentat_core::{
|
||||
Attribute,
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
[package]
|
||||
name = "mentat_tx"
|
||||
version = "0.0.1"
|
||||
workspace = ".."
|
||||
|
||||
[dependencies]
|
||||
[dependencies.edn]
|
||||
path = "../edn"
|
|
@ -1 +0,0 @@
|
|||
This sub-crate implements the core types used by the transaction processor.
|
|
@ -1,13 +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.
|
||||
|
||||
#[allow(unused_imports)]
|
||||
#[macro_use] extern crate edn;
|
||||
pub use edn::entities;
|
Loading…
Reference in a new issue