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

Function GraphContext_DeleteIndex

src/graph/graphcontext.c:739–764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

737}
738
739int 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

Callers 2

_index_operation_deleteFunction · 0.85

Calls 4

GraphContext_GetSchemaFunction · 0.85
Schema_RemoveIndexFunction · 0.85
QueryCtx_GetResultSetFunction · 0.85
ResultSet_IndexDeletedFunction · 0.85

Tested by

no test coverage detected