Crate r2d2_sqlite [−] [src]
Sqlite support for the r2d2
connection pool.
Library crate: r2d2-sqlite
Integrated with: r2d2 and rusqlite
Example
extern crate r2d2; extern crate r2d2_sqlite; extern crate rusqlite; use std::thread; use r2d2_sqlite::SqliteConnectionManager; fn main() { let config = r2d2::Config::default(); let manager = SqliteConnectionManager::new_in_memory(); let pool = r2d2::Pool::new(config, manager).unwrap(); for i in 0..10i32 { let pool = pool.clone(); thread::spawn(move || { let conn = pool.get().unwrap(); conn.execute("INSERT INTO foo (bar) VALUES ($1)", &[&i]).unwrap(); }); } }
Structs
SqliteConnectionManager |
An |
Enums
Error |
A unified enum of errors returned by |