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

Function Record_DeepClone

src/execution_plan/record.c:105–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void Record_DeepClone
106(
107 const Record r,
108 Record clone
109) {
110 int entry_count = Record_length(r);
111 size_t required_record_size = sizeof(Entry) * entry_count;
112
113 memcpy(clone->entries, r->entries, required_record_size);
114
115 // Deep copy scalars
116 for(uint i = 0; i < entry_count; i++) {
117 if(r->entries[i].type == REC_TYPE_SCALAR) {
118 clone->entries[i].value.s = SI_CloneValue(r->entries[i].value.s);
119 }
120 }
121}
122
123void Record_Merge
124(

Callers 1

OpBase_DeepCloneRecordFunction · 0.85

Calls 2

Record_lengthFunction · 0.85
SI_CloneValueFunction · 0.85

Tested by

no test coverage detected