Pre: use 'db/syncable' feature; derive serialization for PartitionMap
This commit is contained in:
parent
b8b2aef181
commit
6160dd59f7
3 changed files with 5 additions and 2 deletions
|
@ -55,11 +55,11 @@ mod tx_checking;
|
||||||
pub mod types;
|
pub mod types;
|
||||||
mod upsert_resolution;
|
mod upsert_resolution;
|
||||||
|
|
||||||
// Export these for reference from tests. cfg(test) should work, but doesn't.
|
// Export these for reference from sync code and tests.
|
||||||
// #[cfg(test)]
|
|
||||||
pub use bootstrap::{
|
pub use bootstrap::{
|
||||||
TX0,
|
TX0,
|
||||||
USER0,
|
USER0,
|
||||||
|
V1_PARTS,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub static TIMELINE_MAIN: i64 = 0;
|
pub static TIMELINE_MAIN: i64 = 0;
|
||||||
|
@ -108,6 +108,7 @@ pub use tx_observer::{
|
||||||
pub use types::{
|
pub use types::{
|
||||||
AttributeSet,
|
AttributeSet,
|
||||||
DB,
|
DB,
|
||||||
|
Partition,
|
||||||
PartitionMap,
|
PartitionMap,
|
||||||
TransactableValue,
|
TransactableValue,
|
||||||
};
|
};
|
||||||
|
|
|
@ -95,6 +95,7 @@ impl Partition {
|
||||||
|
|
||||||
/// Map partition names to `Partition` instances.
|
/// Map partition names to `Partition` instances.
|
||||||
#[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialOrd, PartialEq)]
|
#[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialOrd, PartialEq)]
|
||||||
|
#[cfg_attr(feature = "syncable", derive(Serialize,Deserialize))]
|
||||||
pub struct PartitionMap(BTreeMap<String, Partition>);
|
pub struct PartitionMap(BTreeMap<String, Partition>);
|
||||||
|
|
||||||
impl Deref for PartitionMap {
|
impl Deref for PartitionMap {
|
||||||
|
|
|
@ -31,6 +31,7 @@ path = "../core-traits"
|
||||||
|
|
||||||
[dependencies.mentat_db]
|
[dependencies.mentat_db]
|
||||||
path = "../db"
|
path = "../db"
|
||||||
|
features = ["syncable"]
|
||||||
|
|
||||||
[dependencies.db_traits]
|
[dependencies.db_traits]
|
||||||
path = "../db-traits"
|
path = "../db-traits"
|
||||||
|
|
Loading…
Reference in a new issue