Go driver
This section presents the breaking changes between the Neo4j 1.8 Go Driver and 4.x Go Driver.
The latest version of the Go driver for Neo4j can be found on the Go driver’s official page.
-
All import statements need to be changed to
"github.com/neo4j/neo4j-go-driver/v4/neo4j"
. -
NewSession
does not return an error anymore. -
Result
now exposes aSingle
method, which outputs the only record returned by the query. -
Record
now directly exposesKeys
andValues
.
See full changelog: https://github.com/neo4j/neo4j-go-driver/wiki/4.x-changelog.
Example 1. Example of changes between the 1.8 Go driver and the 4.x Go driver
Example code for the 4.x Go driver | Example code for the 1.8 Go driver |
---|---|
|
|