Make debug structs and functions non-public. r=grisha
This commit is contained in:
parent
66e6fef75e
commit
e817f67470
1 changed files with 6 additions and 6 deletions
|
@ -40,7 +40,7 @@ use types::Schema;
|
||||||
|
|
||||||
/// Represents a *datom* (assertion) in the store.
|
/// Represents a *datom* (assertion) in the store.
|
||||||
#[derive(Clone,Debug,Eq,Hash,Ord,PartialOrd,PartialEq)]
|
#[derive(Clone,Debug,Eq,Hash,Ord,PartialOrd,PartialEq)]
|
||||||
pub struct Datom {
|
struct Datom {
|
||||||
// TODO: generalize this.
|
// TODO: generalize this.
|
||||||
e: Entid,
|
e: Entid,
|
||||||
a: Entid,
|
a: Entid,
|
||||||
|
@ -54,7 +54,7 @@ pub struct Datom {
|
||||||
/// To make comparision easier, we deterministically order. The ordering is the ascending tuple
|
/// 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
|
/// 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.
|
/// value that is not exposed but is deterministic.
|
||||||
pub struct Datoms(pub Vec<Datom>);
|
struct Datoms(pub Vec<Datom>);
|
||||||
|
|
||||||
/// Represents an ordered sequence of transactions in the store.
|
/// Represents an ordered sequence of transactions in the store.
|
||||||
///
|
///
|
||||||
|
@ -62,7 +62,7 @@ pub struct Datoms(pub Vec<Datom>);
|
||||||
/// ordering determined by `(e, a, (value_type_tag, v), tx, added)`, where `value_type_tag` is an
|
/// 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
|
/// internal value that is not exposed but is deterministic, and `added` is ordered such that
|
||||||
/// retracted assertions appear before added assertions.
|
/// retracted assertions appear before added assertions.
|
||||||
pub struct Transactions(pub Vec<Datoms>);
|
struct Transactions(pub Vec<Datoms>);
|
||||||
|
|
||||||
/// Represents the fulltext values in the store.
|
/// Represents the fulltext values in the store.
|
||||||
pub struct FulltextValues(pub Vec<(i64, String)>);
|
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
|
/// Return the set of datoms in the store, ordered by (e, a, v, tx), but not including any datoms of
|
||||||
/// the form [... :db/txInstant ...].
|
/// the form [... :db/txInstant ...].
|
||||||
pub fn datoms<S: Borrow<Schema>>(conn: &rusqlite::Connection, schema: &S) -> Result<Datoms> {
|
fn datoms<S: Borrow<Schema>>(conn: &rusqlite::Connection, schema: &S) -> Result<Datoms> {
|
||||||
datoms_after(conn, schema, bootstrap::TX0 - 1)
|
datoms_after(conn, schema, bootstrap::TX0 - 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ pub fn datoms<S: Borrow<Schema>>(conn: &rusqlite::Connection, schema: &S) -> Res
|
||||||
/// ordered by (e, a, v, tx).
|
/// ordered by (e, a, v, tx).
|
||||||
///
|
///
|
||||||
/// The datom set returned does not include any datoms of the form [... :db/txInstant ...].
|
/// The datom set returned does not include any datoms of the form [... :db/txInstant ...].
|
||||||
pub fn datoms_after<S: Borrow<Schema>>(conn: &rusqlite::Connection, schema: &S, tx: i64) -> Result<Datoms> {
|
fn datoms_after<S: Borrow<Schema>>(conn: &rusqlite::Connection, schema: &S, tx: i64) -> Result<Datoms> {
|
||||||
let borrowed_schema = schema.borrow();
|
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")?;
|
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<S: Borrow<Schema>>(conn: &rusqlite::Connection, schema: &S,
|
||||||
/// given `tx`, ordered by (tx, e, a, v).
|
/// given `tx`, ordered by (tx, e, a, v).
|
||||||
///
|
///
|
||||||
/// Each transaction returned includes the [:db/tx :db/txInstant ...] datom.
|
/// Each transaction returned includes the [:db/tx :db/txInstant ...] datom.
|
||||||
pub fn transactions_after<S: Borrow<Schema>>(conn: &rusqlite::Connection, schema: &S, tx: i64) -> Result<Transactions> {
|
fn transactions_after<S: Borrow<Schema>>(conn: &rusqlite::Connection, schema: &S, tx: i64) -> Result<Transactions> {
|
||||||
let borrowed_schema = schema.borrow();
|
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")?;
|
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")?;
|
||||||
|
|
Loading…
Reference in a new issue