rs-db-driver-sqlite-rusqlite 0.1.0
SQLite: rusqlite (the driver, re-exported, with a runnable example)
Install
cargo add rs-db-driver-sqlite-rusqlite --registry rupm
In Ruststudio: Packages, search for rs-db-driver-sqlite-rusqlite, Install.
Owner: Rust Studio. Licence: MIT OR Apache-2.0. Total downloads: 0. Published 2026-11-23.
Versions
- 0.1.0 2026-11-23
README
# rs-db-driver-sqlite-rusqlite
SQLite - rusqlite: SQLite with the library bundled
Add it with `rupm add rs-db-driver-sqlite-rusqlite` (or `cargo add rs-db-driver-sqlite-rusqlite --registry rupm`). The driver `rusqlite` is re-exported as `rs_db_driver_sqlite_rusqlite::rusqlite`.
**Needs on the PC:** a C compiler (the bundled SQLite is compiled with your program)
## Example
```rust
use rusqlite::{Connection, Result};
fn main() -> Result<()> {
let conn = Connection::open("app.db")?;
conn.execute("CREATE TABLE IF NOT EXISTS item (id INTEGER PRIMARY KEY, name TEXT NOT NULL)", [])?;
conn.execute("INSERT INTO item (name) VALUES (?1)", ["first"])?;
let n: i64 = conn.query_row("SELECT COUNT(*) FROM item", [], |r| r.get(0))?;
println!("{n} row(s) in app.db");
Ok(())
}
```