From d792e222a6c6a4e2bd4924bbef13c8328c5b8212 Mon Sep 17 00:00:00 2001 From: Jordan Bonecutter Date: Mon, 10 Feb 2025 11:55:40 -0800 Subject: [PATCH] support uuid --- go.mod | 2 ++ go.sum | 2 ++ neo4j/internal/bolt/outgoing.go | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/go.mod b/go.mod index 3de8e48a..e987f78c 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,5 @@ module github.com/neo4j/neo4j-go-driver/v5 go 1.18 + +require github.com/google/uuid v1.6.0 diff --git a/go.sum b/go.sum index e69de29b..7790d7c3 100644 --- a/go.sum +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= diff --git a/neo4j/internal/bolt/outgoing.go b/neo4j/internal/bolt/outgoing.go index 241be903..d48be82a 100644 --- a/neo4j/internal/bolt/outgoing.go +++ b/neo4j/internal/bolt/outgoing.go @@ -25,6 +25,7 @@ import ( "reflect" "time" + "github.com/google/uuid" "github.com/neo4j/neo4j-go-driver/v5/neo4j/db" "github.com/neo4j/neo4j-go-driver/v5/neo4j/dbtype" "github.com/neo4j/neo4j-go-driver/v5/neo4j/internal/packstream" @@ -415,6 +416,11 @@ func (o *outgoing) packX(x any) { o.packX(v.Index(i).Interface()) } } + case reflect.Array: + switch v := x.(type) { + case uuid.UUID: + o.packer.String(v.String()) + } case reflect.Map: // Optimizations switch m := x.(type) {