Expand description
r2d2-cypher is a r2d2 connection pool for rusted-cypher.
§Example
extern crate r2d2;
extern crate r2d2_cypher;
use r2d2::Pool;
use r2d2_cypher::CypherConnectionManager;
pub fn main() {
let db_url = "http://neo4j:neo4j@127.0.0.1:7474/db/data";
let manager = CypherConnectionManager{url:db_url.to_owned()};
let pool = Pool::builder().max_size(5).build(manager).unwrap();
let client = pool.clone().get().unwrap();
let result = client.cypher().exec("MATCH (n)-[r]->() RETURN n");
}
Structs§
- A struct that holds connection specific information.