Goals If you are a Go developer, this guide provides an overview of options for connecting to Neo4j. While this guide is not comprehensive it will introduce the different drivers and link to the relevant resources. Prerequisites You should be… Learn More →
If you are a Go developer, this guide provides an overview of options for connecting to Neo4j. While this guide is not comprehensive it will introduce the different drivers and link to the relevant resources.
You should be familiar with graph database concepts and the property graph model. You should have installed Neo4j and made yourself familiar with our Cypher Query language.
Neo4j for Go Developers
Go drivers have been around for a while and, especially with the excellent
cq driver from Eve Freeman, have gotten a lot of attention. Recently the work of John Nadratowski added a driver with Bolt support.
Members of the Go community have invested a lot of time and love to develop all these drivers, so if you use them, please provide feedback to the authors.
The Example Project
The Neo4j example project is a small, one page webapp for the movies database built into the Neo4j tutorial. The front-end page is the same for all drivers: movie search, movie details, and a graph visualization of actors and movies. Each backend implementation shows you how to connect to Neo4j from each of the different languages and drivers.
Neo4j Community Drivers
|The drivers below have been thankfully contributed by the Neo4j community. Many of these are fully featured and well maintained. But we don’t take any responsibility for their fitness for use with the most recent versions of Neo4j.|
Golang Neo4J Bolt Driver
This implementation attempts to follow the best practices as per the Bolt specification, but also implements compatibility with Golang’s
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.
- Neo4j Bolt low-level binary protocol support
- Message Pipelining for high concurrency
- Connection Pooling
- TLS support
- Compatible with sql.driver
A database/sql implementation for Cypher inspired by the database/sql package which provides idiomatic go database access. Cypher is close enough to SQL that it seems to fit pretty well in the database/sql implementation.