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

Method Commit

graph.go:92–102  ·  view source on GitHub ↗

Commit creates the entire graph, but will re-add nodes if called again.

()

Source from the content-addressed store, hash-verified

90
91// Commit creates the entire graph, but will re-add nodes if called again.
92func (g *Graph) Commit() (*QueryResult, error) {
93 items := make([]string, 0, len(g.Nodes)+len(g.Edges))
94 for _, n := range g.Nodes {
95 items = append(items, n.Encode())
96 }
97 for _, e := range g.Edges {
98 items = append(items, e.Encode())
99 }
100 q := "CREATE " + strings.Join(items, ",")
101 return g.Query(q)
102}
103
104// NewQueryOptions instantiates a new QueryOptions struct.
105func NewQueryOptions() *QueryOptions {

Callers 4

FlushMethod · 0.95
createGraphFunction · 0.80
TestQueryStatisticsFunction · 0.80
TestNodeMapDatatypeFunction · 0.80

Calls 2

QueryMethod · 0.95
EncodeMethod · 0.45

Tested by 3

createGraphFunction · 0.64
TestQueryStatisticsFunction · 0.64
TestNodeMapDatatypeFunction · 0.64