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

Function raxKeys

src/util/rax_extensions.c:74–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74unsigned char **raxKeys(rax *rax) {
75 // Instantiate an array to hold all of the keys in the rax.
76 unsigned char **keys = array_new(unsigned char *, raxSize(rax));
77 raxIterator it;
78 raxStart(&it, rax);
79 // Iterate over all keys in the rax.
80 raxSeek(&it, "^", NULL, 0);
81 while(raxNext(&it)) {
82 // Copy the key into the array.
83 array_append(keys, (unsigned char *)rm_strndup((const char *)it.key, (int)it.key_len));
84 }
85 raxStop(&it);
86 return keys;
87}
88

Calls 1

rm_strndupFunction · 0.85

Tested by

no test coverage detected