Registry / database / diesel-async

diesel-async

JSON →
library0.9.1rscratesunverified

An async extension for Diesel, the safe, extensible ORM and Query Builder, enabling asynchronous database operations.

# Cargo.toml [dependencies] diesel-async = "0.9.1"
INSTALL
IMPORT
SIG · DIESEL-ASYNC
D
diesel-async
databaserustv0.9.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AsyncConnection
use diesel_async::AsyncConnection;

Creates an async connection pool using Diesel Async.

use diesel_async::AsyncConnection; use diesel_async::pooled_connection::AsyncDieselConnectionManager; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let config = AsyncDieselConnectionManager::<diesel::pg::PgConnection>::new("postgres://localhost/mydb"); let pool = diesel_async::pooled_connection::deadpool::Pool::builder(config).build()?; let mut conn = pool.get().await?; Ok(()) }
Debug
Known issues
gotchaRequires an async runtime like tokio or async-std.
fix
Add tokio as a dependency and use #[tokio::main] or similar.
affects: >=0.1.0
gotchaFeature flags must be enabled for specific database backends (e.g., postgres, mysql).
fix
Enable the appropriate feature in Cargo.toml, e.g., diesel-async = { features = ["postgres"] }.
affects: >=0.1.0
Upgrade
Version history
0.9.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
56 hits · last 30 days
node
50
OpenAI (training)
1
Resources
diesel-async — cargo add diesel-async · libregistry