MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / Map_GetIdx

Function Map_GetIdx

src/datatypes/map.c:161–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161void Map_GetIdx
162(
163 const SIValue map,
164 uint idx,
165 SIValue *key,
166 SIValue *value
167) {
168 ASSERT(SI_TYPE(map) & T_MAP);
169 ASSERT(idx < Map_KeyCount(map));
170 ASSERT(key != NULL);
171 ASSERT(value != NULL);
172
173 Pair p = map.map[idx];
174
175 *key = SI_ShareValue(p.key);
176 *value = SI_ShareValue(p.val);
177}
178
179// checks if 'key' is in map
180bool Map_Contains

Callers 2

AR_MERGEMAPFunction · 0.85
EvalEntityUpdatesFunction · 0.85

Calls 2

Map_KeyCountFunction · 0.85
SI_ShareValueFunction · 0.85

Tested by

no test coverage detected