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

Function ApplyAddAttribute

src/effects/effects_apply.c:270–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270static void ApplyAddAttribute
271(
272 FILE *stream, // effects stream
273 GraphContext *gc // graph to operate on
274) {
275 //--------------------------------------------------------------------------
276 // effect format:
277 // effect type
278 // attribute name
279 //--------------------------------------------------------------------------
280
281 // read attribute name length
282 size_t l;
283 fread_assert(&l, sizeof(l), stream);
284
285 // read attribute name
286 const char attr[l];
287 fread_assert(attr, l, stream);
288
289 // attr should not exist
290 ASSERT(GraphContext_GetAttributeID(gc, attr) == ATTRIBUTE_ID_NONE);
291
292 // add attribute
293 FindOrAddAttribute(gc, attr, false);
294}
295
296// process Update_Edge effect
297static void ApplyUpdateEdge

Callers 1

Effects_ApplyFunction · 0.85

Calls 2

FindOrAddAttributeFunction · 0.85

Tested by

no test coverage detected