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

Function OpBase_Modifies

src/execution_plan/ops/op.c:73–92  ·  view source on GitHub ↗

mark alias as being modified by operation returns the ID associated with alias

Source from the content-addressed store, hash-verified

71// mark alias as being modified by operation
72// returns the ID associated with alias
73int OpBase_Modifies
74(
75 OpBase *op,
76 const char *alias
77) {
78 if(!op->modifies) op->modifies = array_new(const char *, 1);
79 array_append(op->modifies, alias);
80
81 // make sure alias has an entry associated with it
82 // within the record mapping
83 rax *mapping = ExecutionPlan_GetMappings(op->plan);
84
85 void *id = raxFind(mapping, (unsigned char *)alias, strlen(alias));
86 if(id == raxNotFound) {
87 id = (void *)raxSize(mapping);
88 raxInsert(mapping, (unsigned char *)alias, strlen(alias), id, NULL);
89 }
90
91 return (intptr_t)id;
92}
93
94// adds an alias to an existing modifier
95// such that record[modifier] = record[alias]

Callers 15

NewProcCallOpFunction · 0.85
NewNodeByLabelScanOpFunction · 0.85
NewCreateOpFunction · 0.85
NewEdgeIndexScanOpFunction · 0.85
EdgeIndexScanInitFunction · 0.85
NewIndexScanOpFunction · 0.85
NewCondVarLenTraverseOpFunction · 0.85
NewNodeByIdSeekOpFunction · 0.85
NewUnwindOpFunction · 0.85
NewValueHashJoinFunction · 0.85
NewMergeCreateOpFunction · 0.85
_InitializeUpdatesFunction · 0.85

Calls 1

Tested by

no test coverage detected