package neodriver
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Convenience module aggregating the public Neo4j driver API
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.1.2.tar.gz
md5=ddea08803bc57d4928a9f13de54461ae
sha512=d5dc0b69af7972944332b243a28ccc2b15adb62ee9129023cf5a3ea57faf13b048e79579fe03b73d0a17c8c84e32ab92f27de6e2579c59ce4bb5bf8b5131100c
doc/index.html
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 TLSbolt+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).
Documentation
- Quickstart — the first program.
- Usage — sessions, transactions, value types, errors.
- Examples — runnable programs.
- 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 Neodrivercovers the whole API.neodriver_packstream— PackStream binary serialization.neodriver_core— transport-agnostic core (errors, config, temporal values, hydration).neodriver_eio— the Eio (OCaml 5) backend.
API reference
The per-package module documentation (each root module re-exports its API):
- Neodriver — the aggregator (see also the Modules list below).
- Neodriver_core — Errors, Config, Addressing, Deadline, Temporal, Values, Hydration, Capabilities.
- Neodriver_eio — Driver, Conn, Session, Tx, Neo4jResult, Summary, Transport, Bolt, State, Handshake.
- Neodriver_packstream — Packstream.
Modules
The root Neodriver re-exports the whole API:
- connection and transport:
Neodriver.Conn,Neodriver.Transport,Neodriver.Bolt,Neodriver.State; - sessions and transactions:
Neodriver.Session,Neodriver.Tx; - results:
Neodriver.Neo4jResult,Neodriver.Summary; - the entry point:
Neodriver.Driver; - core types:
Neodriver.Packstream,Neodriver.Errors,Neodriver.Config,Neodriver.Addressing,Neodriver.Temporal,Neodriver.Values,Neodriver.Hydration,Neodriver.Capabilities.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page