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

Function GraphContext_DisableConstrains

src/graph/graphcontext.c:364–381  ·  view source on GitHub ↗

disable all constraints

Source from the content-addressed store, hash-verified

362
363// disable all constraints
364void GraphContext_DisableConstrains
365(
366 GraphContext *gc
367) {
368 for(uint i = 0; i < array_len(gc->node_schemas); i ++) {
369 Schema *s = gc->node_schemas[i];
370 for(uint j = 0; j < array_len(s->constraints); j ++) {
371 Constraint_Disable(s->constraints[j]);
372 }
373 }
374
375 for(uint i = 0; i < array_len(gc->relation_schemas); i ++) {
376 Schema *s = gc->relation_schemas[i];
377 for(uint j = 0; j < array_len(s->constraints); j ++) {
378 Constraint_Disable(s->constraints[j]);
379 }
380 }
381}
382
383Schema *GraphContext_GetSchemaByID(const GraphContext *gc, int id, SchemaType t) {
384 Schema **schemas = (t == SCHEMA_NODE) ? gc->node_schemas : gc->relation_schemas;

Callers 1

Calls 2

array_lenFunction · 0.85
Constraint_DisableFunction · 0.85

Tested by

no test coverage detected