Part 1: Move intern_set
into edn
crate.
It's not great to keep lifting functionality higher and higher up the crate hierarchy, but we really do want to intern while we parse. Eventually, I expect that we will split the `edn` crate into `types` and `parsing`, and the `types` crate can depend on a more efficient interning dependency.
This commit is contained in:
parent
d82c7f8ef2
commit
87f850a44e
7 changed files with 25 additions and 19 deletions
|
@ -365,7 +365,6 @@ impl HasSchema for Schema {
|
|||
}
|
||||
}
|
||||
|
||||
pub mod intern_set;
|
||||
pub mod counter;
|
||||
pub mod util;
|
||||
|
||||
|
|
15
db/src/db.rs
15
db/src/db.rs
|
@ -1119,20 +1119,21 @@ mod tests {
|
|||
use debug;
|
||||
use errors;
|
||||
use edn;
|
||||
use edn::{
|
||||
InternSet,
|
||||
};
|
||||
use edn::entities::{
|
||||
OpType,
|
||||
TempId,
|
||||
};
|
||||
|
||||
use mentat_core::{
|
||||
HasSchema,
|
||||
Keyword,
|
||||
KnownEntid,
|
||||
attribute,
|
||||
};
|
||||
use mentat_core::intern_set::{
|
||||
InternSet,
|
||||
};
|
||||
use mentat_core::util::Either::*;
|
||||
use edn::entities::{
|
||||
OpType,
|
||||
TempId,
|
||||
};
|
||||
use rusqlite;
|
||||
use std::collections::{
|
||||
BTreeMap,
|
||||
|
|
|
@ -66,6 +66,7 @@ use db::{
|
|||
PartitionMapping,
|
||||
};
|
||||
use edn::{
|
||||
InternSet,
|
||||
Keyword,
|
||||
};
|
||||
use entids;
|
||||
|
@ -101,8 +102,6 @@ use mentat_core::{
|
|||
now,
|
||||
};
|
||||
|
||||
use mentat_core::intern_set::InternSet;
|
||||
|
||||
use edn::entities as entmod;
|
||||
use edn::entities::{
|
||||
AttributePlace,
|
||||
|
|
|
@ -41,7 +41,7 @@ impl<T> InternSet<T> where T: Eq + Hash {
|
|||
///
|
||||
/// ```
|
||||
/// use std::rc::Rc;
|
||||
/// use mentat_core::intern_set::InternSet;
|
||||
/// use edn::intern_set::InternSet;
|
||||
///
|
||||
/// let mut s = InternSet::new();
|
||||
///
|
|
@ -23,6 +23,10 @@ extern crate serde;
|
|||
extern crate serde_derive;
|
||||
|
||||
pub mod entities;
|
||||
pub mod intern_set;
|
||||
pub use intern_set::{
|
||||
InternSet,
|
||||
};
|
||||
// Intentionally not pub.
|
||||
mod namespaceable_name;
|
||||
pub mod query;
|
||||
|
|
|
@ -41,6 +41,9 @@ use rusqlite::{
|
|||
};
|
||||
|
||||
use edn;
|
||||
use edn::{
|
||||
InternSet,
|
||||
};
|
||||
|
||||
use mentat_core::{
|
||||
Attribute,
|
||||
|
@ -55,8 +58,6 @@ use mentat_core::{
|
|||
ValueType,
|
||||
};
|
||||
|
||||
use mentat_core::intern_set::InternSet;
|
||||
|
||||
use mentat_db::cache::{
|
||||
InProgressCacheTransactWatcher,
|
||||
InProgressSQLiteAttributeCache,
|
||||
|
|
|
@ -53,6 +53,14 @@
|
|||
// We probably need both, but this file provides the latter. Unfortunately, Entity -- the input to
|
||||
// the transactor -- is intimately tied to EDN and to spanned values.
|
||||
|
||||
use edn::{
|
||||
InternSet,
|
||||
};
|
||||
use edn::entities::{
|
||||
OpType,
|
||||
TempId,
|
||||
};
|
||||
|
||||
use mentat_core::{
|
||||
HasSchema,
|
||||
KnownEntid,
|
||||
|
@ -60,7 +68,6 @@ use mentat_core::{
|
|||
TypedValue,
|
||||
};
|
||||
|
||||
use mentat_core::intern_set::InternSet;
|
||||
use mentat_core::util::Either;
|
||||
|
||||
use mentat_db::{
|
||||
|
@ -75,11 +82,6 @@ use mentat_db::internal_types::{
|
|||
TypedValueOr,
|
||||
};
|
||||
|
||||
use edn::entities::{
|
||||
OpType,
|
||||
TempId,
|
||||
};
|
||||
|
||||
use conn::{
|
||||
InProgress,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue