Packages / rupm

rs-db-driver-sqlite-diesel 0.1.0

SQLite: diesel (the driver, re-exported, with a runnable example)

Install

cargo add rs-db-driver-sqlite-diesel --registry rupm

In Ruststudio: Packages, search for rs-db-driver-sqlite-diesel, Install.

Owner: Rust Studio. Licence: MIT OR Apache-2.0. Total downloads: 0. Published 2026-11-23.

Versions

README

# rs-db-driver-sqlite-diesel

SQLite - diesel: ORM and query builder

Add it with `rupm add rs-db-driver-sqlite-diesel` (or `cargo add rs-db-driver-sqlite-diesel --registry rupm`). The driver `diesel` is re-exported as `rs_db_driver_sqlite_diesel::diesel`.

**Needs on the PC:** a C compiler (SQLite is bundled)

## Example

```rust
use diesel::prelude::*;
use diesel::sql_query;

fn main() -> Result<(), diesel::result::Error> {
    let mut conn = SqliteConnection::establish("app.db").expect("cannot open app.db");
    sql_query("CREATE TABLE IF NOT EXISTS item (id INTEGER PRIMARY KEY, name TEXT NOT NULL)").execute(&mut conn)?;
    println!("app.db is ready");
    Ok(())
}
```