Crate besu_mysql

Source
Expand description

MySQL dialect and driver for Besu.

§Example

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

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

#[tokio::main]
async fn main() {
    let db = Database::new(
        Sqlx::new("mysql://root:@localhost:3306/besu")
            .await
            .unwrap(),
    );

    // TODO: Insert a user

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

Structs§

MySQL
MySQL dialect implementation.
Sqlx
MySQl driver implementation based on sqlx.