Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

144 Commits

Repository files navigation

r2d2-postgres

CircleCI

Documentation

rust-postgres support library for the r2d2 connection pool.

Example

use std::thread;use r2d2_postgres::{postgres::NoTls,PostgresConnectionManager};fnmain(){let manager = PostgresConnectionManager::new("host=localhost user=postgres".parse().unwrap(),NoTls,);let pool = r2d2::Pool::new(manager).unwrap();for i in0..10i32{let pool = pool.clone();
thread::spawn(move || {letmut client = pool.get().unwrap();
client.execute("INSERT INTO foo (bar) VALUES ($1)",&[&i]).unwrap();});}}

About

No description, website, or topics provided.

Resources

Stars

158 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages