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

Function Proc_LabelsStep

src/procedures/proc_labels.c:43–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43SIValue *Proc_LabelsStep
44(
45 ProcedureCtx *ctx
46) {
47 ASSERT(ctx->privateData != NULL);
48
49 LabelsContext *pdata = (LabelsContext *)ctx->privateData;
50
51 // depleted?
52 if(pdata->schema_id >= GraphContext_SchemaCount(pdata->gc, SCHEMA_NODE))
53 return NULL;
54
55 // get schema label
56 Schema *s = GraphContext_GetSchemaByID(pdata->gc, pdata->schema_id++, SCHEMA_NODE);
57 char *label = (char *)Schema_GetName(s);
58 pdata->output[0] = SI_ConstStringVal(label);
59 return pdata->output;
60}
61
62ProcedureResult Proc_LabelsFree
63(

Callers

nothing calls this directly

Calls 4

GraphContext_SchemaCountFunction · 0.85
Schema_GetNameFunction · 0.85
SI_ConstStringValFunction · 0.85

Tested by

no test coverage detected