use std::path::Path; use tokio_rusqlite::{Connection, OpenFlags}; pub struct Reader { pub connection: Connection, } impl Reader { pub async fn new(path: &Path) -> Result { let connection = Connection::open_with_flags(path, OpenFlags::SQLITE_OPEN_READ_ONLY).await?; Ok(Self{connection}) } }