2 releases

0.1.1 Apr 26, 2024
0.1.0 Apr 6, 2024

#1450 in Database interfaces

Download history 10/week @ 2024-09-22 3/week @ 2024-09-29

86 downloads per month

MIT license

380KB
3.5K SLoC

Deadpool for UnReQL

This crate implements a deadpool manager for unreql.

Example

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?;

lib.rs:

Deadpool for UnReQL

This crate implements a deadpool manager for unreql.

Example

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?;

Dependencies

~16–30MB
~552K SLoC