Crate besu_postgres

Source
Expand description

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());
}

Structs§

Postgres
Postgres dialect implementation.
Sqlx
Postgres driver implementation based on sqlx.