1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//! # Building blocks for persisted Holochain state
//!
//! See crate README for more info.
//!
//! See [this hackmd](https://holo.hackmd.io/@holochain/SkuVLpqEL) for a diagram explaining the relationships between these building blocks and the higher abstractions

// pub mod buffer;
pub mod conn;
pub mod db;
pub mod error;
pub mod exports;
pub mod fatal;
// pub mod key;
pub mod prelude;
pub mod schema;
pub mod sql;
pub mod swansong;
// pub mod transaction;

mod table;

#[cfg(any(test, feature = "test_utils"))]
pub mod test_utils;

// Re-export rusqlite for use with `impl_to_sql_via_as_ref!` macro
pub use ::rusqlite;

#[macro_export]
/// Macro to generate a fresh reader from an DbRead with less boilerplate
macro_rules! fresh_reader {
    ($env: expr, $f: expr) => {{
        let mut conn = $env.conn()?;
        $crate::db::ReadManager::with_reader(&mut conn, $f)
    }};
}