Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

rust-postgres/r2d2-postgres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI

Documentation

rust-postgres support library for ther2d2 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 iin0..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

License

Stars

Watchers

Forks

Packages

No packages published

Contributors8

Languages


[8]ページ先頭

©2009-2025 Movatter.jp