helge

Crates.iohelge
lib.rshelge
version3.0.0
sourcesrc
created_at2021-11-19 13:51:06.631254
updated_at2023-09-01 15:37:13.923874
descriptionTiny wrapper around r2d2::Pool and diesel ConnectionManager to ease use in async contexts
homepage
repositoryhttps://github.com/nicrgren/helge
max_upload_size
id484461
size20,609
Niclas Rosengren (nicrgren)

documentation

README

helge

Helge is a tiny wrapper around r2d2::Pool and diesel ConnectionManager to provide a simple way to use diesel postgres with r2d2 in an async context.


Example


let helge = Helge::<diesel::PgConnection>::new("postgres://localhost/somedatabase")?;
helge.query(|conn| {
    diesel::insert_into(users::table)
        .values(&NewUser {
            name: String::from("Helge"),
        })
        .execute(conn)
}).await?;

License: MIT

Commit count: 12

cargo fmt