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

Method parseMap

query_result.go:231–242  ·  view source on GitHub ↗
(cell interface{})

Source from the content-addressed store, hash-verified

229}
230
231func (qr *QueryResult) parseMap(cell interface{}) map[string]interface{} {
232 var raw_map = cell.([]interface{})
233 var mapLength = len(raw_map)
234 var parsed_map = make(map[string]interface{})
235
236 for i := 0; i < mapLength; i += 2 {
237 key, _ := redis.String(raw_map[i], nil)
238 parsed_map[key] = qr.parseScalar(raw_map[i+1].([]interface{}))
239 }
240
241 return parsed_map
242}
243
244func (qr *QueryResult) parseScalar(cell []interface{}) interface{} {
245 t, _ := redis.Int(cell[0], nil)

Callers 1

parseScalarMethod · 0.95

Calls 2

parseScalarMethod · 0.95
StringMethod · 0.45

Tested by

no test coverage detected