mirror of
https://github.com/vcscsvcscs/GenerationsHeritage.git
synced 2025-08-13 22:39:06 +02:00
uuid to memgraph compatible
This commit is contained in:
@@ -2,8 +2,10 @@ package memgraph
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/neo4j/neo4j-go-driver/v5/neo4j"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
@@ -19,6 +21,8 @@ func (rp *RelationshipAndPerson) CreateRelationshipAndPerson(driver neo4j.Driver
|
||||
return nil, err
|
||||
}
|
||||
|
||||
rp.Person.ID = strings.ReplaceAll(uuid.New().String(), "-", "")
|
||||
|
||||
query := fmt.Sprintf(`MATCH (a:Person) WHERE a.ID = %s`, rp.Relationship.FirstPersonID)
|
||||
|
||||
query = fmt.Sprintf("%s CREATE (b:Person {%s})", query, rp.Person.ToString())
|
||||
|
Reference in New Issue
Block a user