ANNOUNCEMENT: I must apologize to the community for not being more responsive. Because of personal life events I am really not able to properly maintain this codebase. Certain other events lead me to believe an official Neo4J Golang driver was to be released soon, but it seems like that may not necessarily be the case. Since I am unable to properly maintain this codebase at this juncture, at this point I think it makes sense to open up this repo to collaborators who are interested in helping with maintenance. Please feel free to email me directly if you're interested.
Implements the Neo4J Bolt Protocol specification: As of the time of writing this, the current version is v3.1.0-M02
Features
- Neo4j Bolt low-level binary protocol support
- Message Pipelining for high concurrency
- Connection Pooling
- TLS support
- Compatible with sql.driver
Usage
Please see the statement tests or the conn tests for A LOT of examples of usage
Examples
Quick n’ Dirty
Slow n' Clean
API
There is much more detailed information in the godoc
sql.driver
sql.driversql.driver
It is recommended that you use the Neo4j Bolt-specific interfaces if possible. The implementation is more efficient and can more closely support the Neo4j Bolt feature set.
bolt://(user):(password)@(host):(port)bolt
NewDriverPool
logSetLevel
Dev Quickstart
The tests are written in an integration testing style. Most of them are in the statement tests, but should be made more granular in the future.
In order to get CI, I made a recorder mechanism so you don't need to run neo4j alongside the tests in the CI server. You run the tests locally against a neo4j instance with the RECORD_OUTPUT=1 environment variable, it generates the recordings in the ./recordings folder. This is necessary if the tests have changed, or if the internals have significantly changed. Installing the git hooks will run the tests automatically on push. If there are updated tests, you will need to re-run the recorder to add them and push them as well.
You need access to a running Neo4J database to develop for this project, so that you can run the tests to generate the recordings. For the recordings to be generated correctly you also need to make sure authorization is turned off on the Neo4J instance. For more information on Neo4J installation and configuration see the official Neo4j docs: https://neo4j.com/docs/operations-manual/current/installation/
Supported Builds
- Linux (1.4.x, 1.5.x, 1.6.x, 1.7.x, 1.8.x, 1.9.x and tip)
- MacOs (1.7.x, 1.8.x, 1.9.x and tip) according to golang/go#17824, go 1.6.4 (and anything prior does not support osx 10.12) which results in unpredicable behavior (sometimes it is okay, sometimes build hangs, and sometimes build fail due to segfault)
TODO
- Cypher Parser to implement NumInput and pre-flight checking
- More Tests
- Benchmark Tests