| Crates.io | helge |
| lib.rs | helge |
| version | 3.0.0 |
| created_at | 2021-11-19 13:51:06.631254+00 |
| updated_at | 2023-09-01 15:37:13.923874+00 |
| description | Tiny wrapper around r2d2::Pool and diesel ConnectionManager to ease use in async contexts |
| homepage | |
| repository | https://github.com/nicrgren/helge |
| max_upload_size | |
| id | 484461 |
| size | 20,609 |
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.
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