Expand description
An extended SQLite client. Binary files are ordinary SQLite databases; readable files independently store schemas and rows as a YAML stream.
use boxdb::{Database, Value};
let mut db = Database::memory();
db.execute("CREATE TABLE users(id INT64 PRIMARY KEY, name TEXT NOT NULL)")?;
db.execute_params("INSERT INTO users(name) VALUES(?)", &[Value::Text("Ada".into())])?;
assert_eq!(db.execute("SELECT name FROM users")?[0].rows,
vec![vec![Value::Text("Ada".into())]]);Re-exports§
Modules§
- changeset
- SQLite’s changeset wire format, encoded and decoded in Rust so recorded changes keep BoxDB’s tagged storage cells. The byte layout follows the session extension’s documented CHANGESET and PATCHSET formats.
- migrations
- Versioned SQL migrations executed through BoxDB’s typed connection.
- types
Structs§
- Check
- Check
Issue - Check
Report - Database
- Error
- A BoxDB failure retaining its original cause and engine result codes.
- Interrupt
Handle - Thread-safe cancellation of user SQL, allowing internal cleanup to finish.
- Open
Options - Options used by asynchronous language bindings while opening a connection.
- Query
Result - Recovery
Report - Rejected
Document - Statement
Info - Metadata used by language bindings without executing the statement.