Skip to main content

Crate boxdb

Crate boxdb 

Source
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§

pub use types::Type;
pub use types::Value;

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
CheckIssue
CheckReport
Database
Error
A BoxDB failure retaining its original cause and engine result codes.
InterruptHandle
Thread-safe cancellation of user SQL, allowing internal cleanup to finish.
OpenOptions
Options used by asynchronous language bindings while opening a connection.
QueryResult
RecoveryReport
RejectedDocument
StatementInfo
Metadata used by language bindings without executing the statement.

Enums§

CheckMode
CheckStatus
ErrorOperation
Format
OperationOutcome
SchemaFormat

Type Aliases§

Result