01 Start a local Rust database
Open a native .tapir file, make a table, write a row, and close the connection.
Use the documented core API
use tapirus::{Connection, Result};
fn main() -> Result<()> {
let db = Connection::open("notes.tapir")?;
db.execute("CREATE TABLE IF NOT EXISTS notes (id INTEGER PRIMARY KEY, body TEXT NOT NULL)")?;
db.execute("INSERT INTO notes (id, body) VALUES (1, 'Local note')")?;
println!("{:?}", db.query("SELECT id, body FROM notes")?);
db.close()
}