mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-28 16:49:58 -07:00
global: snapshot + core: impl Display for bytes structs
This commit is contained in:
25
crates/brk_query/examples/main.rs
Normal file
25
crates/brk_query/examples/main.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
use std::path::Path;
|
||||
|
||||
use brk_computer::Computer;
|
||||
use brk_indexer::Indexer;
|
||||
use brk_query::{Index, Query};
|
||||
|
||||
pub fn main() -> color_eyre::Result<()> {
|
||||
color_eyre::install()?;
|
||||
|
||||
let outputs_dir = Path::new("../../_outputs");
|
||||
|
||||
let mut indexer = Indexer::new(outputs_dir.join("indexed"))?;
|
||||
indexer.import_vecs()?;
|
||||
|
||||
let mut computer = Computer::new(outputs_dir.join("computed"));
|
||||
computer.import_vecs()?;
|
||||
|
||||
let query = Query::build(&indexer, &computer);
|
||||
|
||||
dbg!(query.search(Index::Height, &["date"], Some(-1), None, None)?);
|
||||
dbg!(query.search(Index::Height, &["date"], Some(-10), None, None)?);
|
||||
dbg!(query.search(Index::Height, &["date", "timestamp"], Some(-10), None, None)?);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user