pub async fn with_postgres_connection<F, R, E>(
connection_string: impl Into<String>,
operation: F,
) -> Result<R, PostgresError>
Expand description
Execute a function with a direct database connection using tokio-postgres This is the most efficient way to perform a one-off database operation The connection is automatically closed when the operation completes