MCPcopy Create free account
hub / github.com/RedisGraph/redisgraph-go / GraphNew

Function GraphNew

graph.go:29–39  ·  view source on GitHub ↗

New creates a new graph.

(Id string, conn redis.Conn)

Source from the content-addressed store, hash-verified

27
28// New creates a new graph.
29func GraphNew(Id string, conn redis.Conn) Graph {
30 return Graph{
31 Id: Id,
32 Nodes: make(map[string]*Node, 0),
33 Edges: make([]*Edge, 0),
34 Conn: conn,
35 labels: make([]string, 0),
36 relationshipTypes: make([]string, 0),
37 properties: make([]string, 0),
38 }
39}
40
41// AddNode adds a node to the graph.
42func (g *Graph) AddNode(n *Node) {

Callers 1

createGraphFunction · 0.85

Calls

no outgoing calls

Tested by 1

createGraphFunction · 0.68