fix api api communications

This commit is contained in:
2024-05-17 14:03:34 +02:00
parent 069d9317a3
commit 4db7a35271
12 changed files with 195 additions and 145 deletions

View File

@@ -2,10 +2,8 @@ package memgraph
import (
"fmt"
"strings"
"time"
"github.com/google/uuid"
"github.com/neo4j/neo4j-go-driver/v5/neo4j"
"golang.org/x/net/context"
)
@@ -21,8 +19,6 @@ func (p *Person) CreatePerson(driver neo4j.DriverWithContext) (*neo4j.Record, er
return nil, err
}
p.ID = strings.ReplaceAll(uuid.New().String(), "-", "")
query := fmt.Sprintf("CREATE (n:Person {%s}) RETURN n;", p.ToString())
result, err := session.Run(ctx, query, nil)