From c4301fa05479f4ffdbf72d203582da5e192dade0 Mon Sep 17 00:00:00 2001 From: Peter Wilhelmsson Date: Tue, 19 May 2020 07:54:28 +0200 Subject: [PATCH] Clearification of supported Neo4j versions Added info to README and more informative error message. --- README.md | 8 ++++++++ neo4j/internal/bolt/connect.go | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d2f4b076..65b60a7b 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,14 @@ for result.Next() { return result.Err() ``` +## Neo4j and Bolt protocol versions + +The driver implements Bolt protocol version 3. This means that either Neo4j server 3.5 or above can be used with the driver. + +Neo4j server 4 supports both Bolt protocol version 3 and version 4. + +There will be an updated driver version that supports Bolt protocol version 4 to make use of new features introduced there. + ## Connecting to a causal cluster You just need to use `bolt+routing` as the URL scheme and set host of the URL to one of your core members of the cluster. diff --git a/neo4j/internal/bolt/connect.go b/neo4j/internal/bolt/connect.go index 4aec09da..ca9fa3d5 100644 --- a/neo4j/internal/bolt/connect.go +++ b/neo4j/internal/bolt/connect.go @@ -71,7 +71,7 @@ func Connect(serverName string, conn net.Conn, auth map[string]interface{}, log } return boltConn, nil case 0: - err = errors.New("Server did not accept any version") + err = errors.New("Server did not accept any of the requested Bolt protocol versions. Only Neo4j version 3.5 and version 4 currently supports Bolt protocol version 3") default: err = errors.New(fmt.Sprintf("Server responded with unsupported version %d", ver)) }