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". -
NewSessiondoes not return an error anymore. -
Resultnow exposes aSinglemethod, which outputs the only record returned by the query. -
Recordnow directly exposesKeysandValues.
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 |
|---|---|
|
|