Pre: use 'db/syncable' feature; derive serialization for PartitionMap

This commit is contained in:
Grisha Kruglov 2018-07-31 10:33:12 -07:00 committed by Grisha Kruglov
parent b8b2aef181
commit 6160dd59f7
3 changed files with 5 additions and 2 deletions

View file

@ -55,11 +55,11 @@ mod tx_checking;
pub mod types;
mod upsert_resolution;
// Export these for reference from tests. cfg(test) should work, but doesn't.
// #[cfg(test)]
// Export these for reference from sync code and tests.
pub use bootstrap::{
TX0,
USER0,
V1_PARTS,
};
pub static TIMELINE_MAIN: i64 = 0;
@ -108,6 +108,7 @@ pub use tx_observer::{
pub use types::{
AttributeSet,
DB,
Partition,
PartitionMap,
TransactableValue,
};

View file

@ -95,6 +95,7 @@ impl Partition {
/// Map partition names to `Partition` instances.
#[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialOrd, PartialEq)]
#[cfg_attr(feature = "syncable", derive(Serialize,Deserialize))]
pub struct PartitionMap(BTreeMap<String, Partition>);
impl Deref for PartitionMap {

View file

@ -31,6 +31,7 @@ path = "../core-traits"
[dependencies.mentat_db]
path = "../db"
features = ["syncable"]
[dependencies.db_traits]
path = "../db-traits"