Neo4rs 
Neo4rs is a native rust driver implemented using bolt 4.1 specification
Getting Started
//Simple query
let uri = "127.0.0.1:7687".to_owned;
let user = "neo4j";
let pass = "neo";
let graph = new.await.unwrap;
assert!;
//Connect using configuration
let config = config
.uri
.user
.password
.db
.fetch_size
.build
.unwrap;
let graph = connect.await.unwrap;
assert!;
//Concurrent queries
let uri = "127.0.0.1:7687";
let user = "neo4j";
let pass = "neo";
let graph = new;
for _ in 1..=42
//Transactions
let mut txn = graph.start_txn.await.unwrap;
txn.run_queries
.await
.unwrap;
txn.commit.await.unwrap; //or txn.rollback().await.unwrap();
//Create and parse relationship
let mut result = graph
.execute
.await
.unwrap;
let row = result.next.await.unwrap.unwrap;
let relation: Relation = row.get.unwrap;
assert!;
assert!;
assert!;
assert_eq!;
assert_eq!;
//Work with raw bytes
let mut result = graph
.execute
.await
.unwrap;
let row = result.next.await.unwrap.unwrap;
let b: = row.get.unwrap;
assert_eq!;
//Work with points
let mut result = graph
.execute
.await
.unwrap;
let row = result.next.await.unwrap.unwrap;
let point: Point3D = row.get.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
//Work with paths
let mut result = graph
.execute
.await
.unwrap;
let row = result.next.await.unwrap.unwrap;
let path: Path = row.get.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
Installation
neo4rs is available on crates.io and can be included in your Cargo enabled project like this:
[]
= "0.3.8"
Roadmap
- bolt protocol
- stream abstraction
- query.run() vs query.execute() abstraction
- respect "has_more" flag returned for PULL
- connection pooling
- explicit transactions
- use buffered TCP streams
- improve error messages & logging
- fetch rows in blocks
- configureable fetch size
- multi db support
- support data types
- Float
- Bytes
- add support for older versions of the protocol
- support structures
- Relationship
- Point2D
- Point3D
- UnboundedRelationship
- Path
- Duration
- Date
- Time
- LocalTime
- DateTime
- DateTimeZoneId
- LocalDateTime
License
Neo4rs is licensed under either of the following, at your option:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)