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

Method Labels

graph.go:277–286  ·  view source on GitHub ↗

Labels, retrieves all node labels.

()

Source from the content-addressed store, hash-verified

275
276// Labels, retrieves all node labels.
277func (g *Graph) Labels() []string {
278 qr, _ := g.CallProcedure("db.labels", nil)
279
280 l := make([]string, len(qr.results))
281
282 for idx, r := range qr.results {
283 l[idx] = r.GetByIndex(0).(string)
284 }
285 return l
286}
287
288// RelationshipTypes, retrieves all edge relationship types.
289func (g *Graph) RelationshipTypes() []string {

Callers 1

getLabelMethod · 0.95

Calls 2

CallProcedureMethod · 0.95
GetByIndexMethod · 0.80

Tested by

no test coverage detected