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

Function ApplyAddSchema

src/effects/effects_apply.c:241–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241static void ApplyAddSchema
242(
243 FILE *stream, // effects stream
244 GraphContext *gc // graph to operate on
245) {
246 //--------------------------------------------------------------------------
247 // effect format:
248 // effect type
249 // schema type
250 // schema name
251 //--------------------------------------------------------------------------
252
253 // read schema type
254 SchemaType t;
255 fread_assert(&t, sizeof(t), stream);
256
257 // read schema name
258 // read string length
259 size_t l;
260 fread_assert(&l, sizeof(l), stream);
261
262 // read string
263 char schema_name[l];
264 fread_assert(schema_name, l, stream);
265
266 // create schema
267 AddSchema(gc, schema_name, t, false);
268}
269
270static void ApplyAddAttribute
271(

Callers 1

Effects_ApplyFunction · 0.85

Calls 1

AddSchemaFunction · 0.85

Tested by

no test coverage detected