1 unstable release

0.0.1 Aug 29, 2024

#6 in #typesafe

MIT license

27KB
476 lines

Besu Postgres

PostgreSQL dialect and driver for Besu a typesafe, async, and database-agnostic query builder for Rust.

Checkout the documentation for more information.


lib.rs:

SQLite dialect and driver for Besu.

Example

use besu::{Database, Table};
use besu_sqlite::Sqlx;

#[derive(Debug, Table)]
pub struct User {
    pub id: i32,
    pub name: String,
}

#[tokio::main]
async fn main() {
    let db = Database::new(
        Sqlx::new(":memory:")
            .await
            .unwrap(),
    );

    // TODO: Insert a user

    println!("{:#?}", db.select(User).await.unwrap());
}

Dependencies

~0–11MB
~135K SLoC