From e817f67470844ee332df508fd2736eb0741a519f Mon Sep 17 00:00:00 2001 From: Richard Newman Date: Tue, 6 Feb 2018 10:25:42 -0800 Subject: [PATCH] Make debug structs and functions non-public. r=grisha --- db/src/debug.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/db/src/debug.rs b/db/src/debug.rs index 64aa30b5..2c002831 100644 --- a/db/src/debug.rs +++ b/db/src/debug.rs @@ -40,7 +40,7 @@ use types::Schema; /// Represents a *datom* (assertion) in the store. #[derive(Clone,Debug,Eq,Hash,Ord,PartialOrd,PartialEq)] -pub struct Datom { +struct Datom { // TODO: generalize this. e: Entid, a: Entid, @@ -54,7 +54,7 @@ pub struct Datom { /// To make comparision easier, we deterministically order. The ordering is the ascending tuple /// ordering determined by `(e, a, (value_type_tag, v), tx)`, where `value_type_tag` is an internal /// value that is not exposed but is deterministic. -pub struct Datoms(pub Vec); +struct Datoms(pub Vec); /// Represents an ordered sequence of transactions in the store. /// @@ -62,7 +62,7 @@ pub struct Datoms(pub Vec); /// ordering determined by `(e, a, (value_type_tag, v), tx, added)`, where `value_type_tag` is an /// internal value that is not exposed but is deterministic, and `added` is ordered such that /// retracted assertions appear before added assertions. -pub struct Transactions(pub Vec); +struct Transactions(pub Vec); /// Represents the fulltext values in the store. pub struct FulltextValues(pub Vec<(i64, String)>); @@ -126,7 +126,7 @@ fn to_entid(schema: &Schema, entid: i64) -> Entid { /// Return the set of datoms in the store, ordered by (e, a, v, tx), but not including any datoms of /// the form [... :db/txInstant ...]. -pub fn datoms>(conn: &rusqlite::Connection, schema: &S) -> Result { +fn datoms>(conn: &rusqlite::Connection, schema: &S) -> Result { datoms_after(conn, schema, bootstrap::TX0 - 1) } @@ -134,7 +134,7 @@ pub fn datoms>(conn: &rusqlite::Connection, schema: &S) -> Res /// ordered by (e, a, v, tx). /// /// The datom set returned does not include any datoms of the form [... :db/txInstant ...]. -pub fn datoms_after>(conn: &rusqlite::Connection, schema: &S, tx: i64) -> Result { +fn datoms_after>(conn: &rusqlite::Connection, schema: &S, tx: i64) -> Result { let borrowed_schema = schema.borrow(); let mut stmt: rusqlite::Statement = conn.prepare("SELECT e, a, v, value_type_tag, tx FROM datoms WHERE tx > ? ORDER BY e ASC, a ASC, value_type_tag ASC, v ASC, tx ASC")?; @@ -174,7 +174,7 @@ pub fn datoms_after>(conn: &rusqlite::Connection, schema: &S, /// given `tx`, ordered by (tx, e, a, v). /// /// Each transaction returned includes the [:db/tx :db/txInstant ...] datom. -pub fn transactions_after>(conn: &rusqlite::Connection, schema: &S, tx: i64) -> Result { +fn transactions_after>(conn: &rusqlite::Connection, schema: &S, tx: i64) -> Result { let borrowed_schema = schema.borrow(); let mut stmt: rusqlite::Statement = conn.prepare("SELECT e, a, v, value_type_tag, tx, added FROM transactions WHERE tx > ? ORDER BY tx ASC, e ASC, a ASC, value_type_tag ASC, v ASC, added ASC")?;