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

Method getRelation

graph.go:216–234  ·  view source on GitHub ↗
(relIdx int)

Source from the content-addressed store, hash-verified

214}
215
216func (g *Graph) getRelation(relIdx int) string {
217 if relIdx >= len(g.relationshipTypes) {
218 // Missing relation type, refresh relation type mapping table.
219 g.mutex.Lock()
220
221 // Recheck now that we've got the lock.
222 if relIdx >= len(g.relationshipTypes) {
223 g.relationshipTypes = g.RelationshipTypes()
224 // Retry.
225 if relIdx >= len(g.relationshipTypes) {
226 // Error!
227 panic("Unknown relation type index.")
228 }
229 }
230 g.mutex.Unlock()
231 }
232
233 return g.relationshipTypes[relIdx]
234}
235
236func (g *Graph) getProperty(propIdx int) string {
237 if propIdx >= len(g.properties) {

Callers 1

parseEdgeMethod · 0.80

Calls 1

RelationshipTypesMethod · 0.95

Tested by

no test coverage detected