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

Function GraphContext_EnableConstrains

src/graph/graphcontext.c:344–361  ·  view source on GitHub ↗

enable all constraints

Source from the content-addressed store, hash-verified

342
343// enable all constraints
344void GraphContext_EnableConstrains
345(
346 const GraphContext *gc
347) {
348 for(uint i = 0; i < array_len(gc->node_schemas); i ++) {
349 Schema *s = gc->node_schemas[i];
350 for(uint j = 0; j < array_len(s->constraints); j ++) {
351 Constraint_Enable(s->constraints[j]);
352 }
353 }
354
355 for(uint i = 0; i < array_len(gc->relation_schemas); i ++) {
356 Schema *s = gc->relation_schemas[i];
357 for(uint j = 0; j < array_len(s->constraints); j ++) {
358 Constraint_Enable(s->constraints[j]);
359 }
360 }
361}
362
363// disable all constraints
364void GraphContext_DisableConstrains

Callers 1

Calls 2

array_lenFunction · 0.85
Constraint_EnableFunction · 0.85

Tested by

no test coverage detected