disable all constraints
| 362 | |
| 363 | // disable all constraints |
| 364 | void 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 | |
| 383 | Schema *GraphContext_GetSchemaByID(const GraphContext *gc, int id, SchemaType t) { |
| 384 | Schema **schemas = (t == SCHEMA_NODE) ? gc->node_schemas : gc->relation_schemas; |
no test coverage detected