Expand description
SQLite WASM Reader - A pure Rust SQLite reader for WASI environments
This library provides a lightweight SQLite database reader that can be used in WebAssembly environments, particularly WASI. It supports reading tables, parsing records, and basic database operations without requiring native SQLite bindings.
§Example
use sqlite_wasm_reader::{Database, Error};
fn main() -> Result<(), Error> {
let mut db = Database::open("example.db")?;
// List all tables
let tables = db.tables()?;
for table in tables {
println!("Table: {}", table);
}
// Read all rows from a table
let rows = db.read_table("users")?;
for row in rows {
println!("{:?}", row);
}
Ok(())
}Re-exports§
pub use error::Error;pub use error::Result;pub use database::Database;pub use value::Value;pub use logging::Logger;pub use logging::LogLevel;pub use logging::init_default_logger;pub use logging::set_log_level;pub use logging::log_error;pub use logging::log_warn;pub use logging::log_info;pub use logging::log_debug;pub use logging::log_trace;pub use format::FileHeader;pub use format::PageType;pub use page::Page;pub use btree::BTreeCursor;pub use btree::Cell;pub use database::Row;
Modules§
- btree
- B-tree traversal functionality
- database
- Main database interface
- error
- Error types for the SQLite reader library
- format
- SQLite file format constants and structures
- logging
- Logging functionality for sqlite_wasm_reader
- page
- Page reading and parsing functionality
- record
- SQLite record parsing
- value
- SQLite value types