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

Method getProperty

graph.go:236–255  ·  view source on GitHub ↗
(propIdx int)

Source from the content-addressed store, hash-verified

234}
235
236func (g *Graph) getProperty(propIdx int) string {
237 if propIdx >= len(g.properties) {
238 // Missing property, refresh property mapping table.
239 g.mutex.Lock()
240
241 // Recheck now that we've got the lock.
242 if propIdx >= len(g.properties) {
243 g.properties = g.PropertyKeys()
244
245 // Retry.
246 if propIdx >= len(g.properties) {
247 // Error!
248 panic("Unknown property index.")
249 }
250 }
251 g.mutex.Unlock()
252 }
253
254 return g.properties[propIdx]
255}
256
257// Procedures
258

Callers 1

parsePropertiesMethod · 0.80

Calls 1

PropertyKeysMethod · 0.95

Tested by

no test coverage detected