1 unstable release
0.0.1 | Aug 29, 2024 |
---|
#6 in #typesafe
28KB
490 lines
Besu SQLite
SQLite dialect and driver for Besu a typesafe, async, and database-agnostic query builder for Rust.
Checkout the documentation for more information.
lib.rs
:
Postgres dialect and driver for Besu.
Example
use besu::{Database, Table};
use besu_postgres::Sqlx;
#[derive(Debug, Table)]
pub struct User {
pub id: i32,
pub name: String,
}
#[tokio::main]
async fn main() {
let db = Database::new(
Sqlx::new("postgres://postgres:@localhost:3306/besu")
.await
.unwrap(),
);
// TODO: Insert a user
println!("{:#?}", db.select(User).await.unwrap());
}
Dependencies
~0–14MB
~182K SLoC