Crates.io | unreql_deadpool |
lib.rs | unreql_deadpool |
version | 0.1.1 |
source | src |
created_at | 2024-04-06 18:24:29.026486 |
updated_at | 2024-04-26 19:21:24.960399 |
description | Deadpool for UnReQL |
homepage | |
repository | https://github.com/vettich/un-rethinkdb-rs.git |
max_upload_size | |
id | 1198474 |
size | 6,146 |
This crate implements a deadpool
manager for unreql
.
use unreql::{r, cmd::connect};
use unreql_deadpool::{IntoPoolWrapper, SessionManager};
use deadpool::managed::Pool;
let cfg = connect::Options::default();
let manager = SessionManager::new(cfg);
let pool = Pool::builder(manager).max_size(20).build().unwrap().wrapper();
let user: User = r.table("users").get("id").exec(&pool).await?;