mithril_persistence/database/query/block_range_root/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
mod delete_block_range_root;
mod get_block_range_root;
mod insert_block_range;

pub use delete_block_range_root::*;
pub use get_block_range_root::*;
pub use insert_block_range::*;

#[cfg(test)]
mod test_helper {
    use crate::database::record::BlockRangeRootRecord;
    use crate::sqlite::{ConnectionExtensions, SqliteConnection};

    use super::*;

    pub fn insert_block_range_roots(
        connection: &SqliteConnection,
        records: Vec<BlockRangeRootRecord>,
    ) {
        connection
            .fetch_first(InsertBlockRangeRootQuery::insert_many(records).unwrap())
            .unwrap();
    }
}