Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
neodriver
The friendly entry point of the driver: open Neodriver exposes the whole API (the neodriver_packstream, neodriver_core and neodriver_eio packages) under one namespace with short names.
Features
Bolt protocol 3.0, 4.2-4.4, 5.0-5.8 and 6.0.
Plain bolt:// and TLS bolt+s:// / bolt+ssc:// connections.
Auto-commit queries with lazy streaming results (Neo4jResult / Summary).
Explicit and managed transactions with automatic retry.
Bookmarks.
Temporal types with named time zones (embedded IANA database plus an LMT fallback before 1970).
Basic authentication (LOGON after HELLO on Bolt >= 5.1).
TestKit conformance: 114 of 126 tests passing (12 skipped).
PLAN.md — the implementation plan and the status of every phase.
Quickstart
Add the driver to your dune project with neodriver and neodriver_eio (and Eio_main to run Eio_main.run). A minimal program that connects and runs a query:
open Neodriver
let () =
Eio_main.run (fun env ->
let net = Eio.Stdenv.net env in
let clock = Eio.Stdenv.mono_clock env in
Eio.Switch.run (fun sw ->
let session =
match
Driver.connect ~uri:"bolt://localhost:7687"
~auth:(Conn.basic_auth ~credentials:"your_password" ())
net clock sw
with
| Ok session -> session
| Error error -> failwith (Errors.to_string error)
in
match Session.run session ~query:"RETURN 1 AS n" ~parameters:[] with
| Ok result -> (
match Neo4jResult.values result with
| Ok [ [ Values.Int n ] ] -> Printf.printf "n = %Ld\n%!" n
| _ -> ())
| Error error -> failwith (Errors.to_string error)))
Packages
The four opam packages, in dependency order:
neodriver — this aggregator: open Neodriver covers the whole API.