Pure Rust implementation of SQLite
Pure Rust implementation of SQLite.
This is WIP and my hobby project.
anyhow for development
velocity. It will be replaced with a proprietary errors in the future.trust-file feature will be added to disable the file validation.unsafe feature for better performance.NOTE: This repository is not stable yet. I may force-push commit tree even on the main branch.
See integration_test.rs for what prsqlite supports.
prsqlite::Connection::open() is the entrypoint interface for library users.
use std::path::Path;
use prsqlite::Connection;
use prsqlite::Value;
let conn = Connection::open(Path::new("path/to/sqlite.db")).unwrap();
let stmt = conn.prepare("INSERT INTO example (col) VALUES (1), (2);").unwrap();
assert_eq!(stmt.execute().unwrap(), 2);
let stmt = conn.prepare("SELECT * FROM example WHERE col = 1;").unwrap();
let mut rows = stmt.query().unwrap();
let row = rows.next_row().unwrap().unwrap();
let columns = row.parse().unwrap();
assert_eq!(columns.get(0), Some(&Value::Integer(1)));
drop(row);
assert!(rows.next_row().unwrap().is_none());prsqlite provides REPL command.
…See CONTRIBUTING.md for details.
Apache 2.0; see LICENSE for details.
This project is not an official Google project. It is not supported by Google and Google specifically disclaims all warranties as to its quality, merchantability, or fitness for a particular purpose.
No open issues yet, or sync has not completed.