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

Function raxClone

src/util/rax_extensions.c:25–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25rax *raxClone(rax *orig) {
26 rax *clone = raxNew();
27
28 raxIterator it;
29 raxStart(&it, orig);
30 raxSeek(&it, "^", NULL, 0);
31
32 // For each key in the original, duplicate the key and its value in the clone.
33 while(raxNext(&it)) {
34 raxInsert(clone, it.key, it.key_len, it.data, NULL);
35 }
36
37 raxStop(&it);
38 return clone;
39}
40
41rax *raxCloneWithCallback(rax *orig, void *(*clone_callback)(void *)) {
42 rax *clone = raxNew();

Callers 8

AST_PrepareMergeOpFunction · 0.85
AST_PrepareCreateOpFunction · 0.85
_Validate_call_subqueryFunction · 0.85
_Validate_FOREACH_ClauseFunction · 0.85
_PopulateReduceCtxFunction · 0.85
_ClonePlanInternalsFunction · 0.85
_buildForeachOpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected