create memgraph compatible uuid

This commit is contained in:
2024-04-18 23:08:35 +02:00
parent e49aba7c58
commit bc7cf7f1a6

View File

@@ -2,6 +2,7 @@ package memgraph
import (
"fmt"
"strings"
"time"
"github.com/google/uuid"
@@ -20,7 +21,7 @@ func (p *Person) CreatePerson(driver neo4j.DriverWithContext) (*neo4j.Record, er
return nil, err
}
p.ID = uuid.New().String()
p.ID = strings.ReplaceAll(uuid.New().String(), "-", "")
query := fmt.Sprintf("CREATE (n:Person {%s}) RETURN n;", p.ToString())