sqlite-parser/src/main.rs

15 lines
387 B
Rust

use sqlite_parser::{error::Error, header::parse_header};
use std::fs::read;
fn main() -> Result<(), Error> {
// first, read in all the bytes of our file
// using unwrap to just panic if this fails
let contents = read("data.sqlite").expect("Failed to read data.sqlite");
let db_header = parse_header(&contents[0..100])?;
println!("{:#?}", db_header);
Ok(())
}