| 737 | } |
| 738 | |
| 739 | int GraphContext_DeleteIndex |
| 740 | ( |
| 741 | GraphContext *gc, |
| 742 | SchemaType schema_type, |
| 743 | const char *label, |
| 744 | const char *field, |
| 745 | IndexType type |
| 746 | ) { |
| 747 | ASSERT(gc != NULL); |
| 748 | ASSERT(label != NULL); |
| 749 | |
| 750 | // retrieve the schema for this label |
| 751 | int res = INDEX_FAIL; |
| 752 | Schema *s = GraphContext_GetSchema(gc, label, schema_type); |
| 753 | |
| 754 | if(s != NULL) { |
| 755 | res = Schema_RemoveIndex(s, field, type); |
| 756 | if(res == INDEX_OK) { |
| 757 | // update resultset statistics |
| 758 | ResultSet *result_set = QueryCtx_GetResultSet(); |
| 759 | ResultSet_IndexDeleted(result_set, res); |
| 760 | } |
| 761 | } |
| 762 | |
| 763 | return res; |
| 764 | } |
| 765 | |
| 766 | //------------------------------------------------------------------------------ |
| 767 | // Functions for globally tracking GraphContexts |
no test coverage detected