removes constraint from schema
| 718 | |
| 719 | // removes constraint from schema |
| 720 | void Schema_RemoveConstraint |
| 721 | ( |
| 722 | Schema *s, // schema |
| 723 | Constraint c // constraint to remove |
| 724 | ) { |
| 725 | // validations |
| 726 | ASSERT(s != NULL); |
| 727 | ASSERT(c != NULL); |
| 728 | |
| 729 | // search for constraint |
| 730 | uint n = array_len(s->constraints); |
| 731 | for(uint i = 0; i < n; i++) { |
| 732 | if(c == s->constraints[i]) { |
| 733 | Constraint_IncPendingChanges(c); |
| 734 | array_del_fast(s->constraints, i); |
| 735 | return; |
| 736 | } |
| 737 | } |
| 738 | |
| 739 | ASSERT(false); |
| 740 | } |
| 741 | |
| 742 | // enforce all constraints under given schema on entity |
| 743 | bool Schema_EnforceConstraints |
no test coverage detected