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

Function _process_yield

src/procedures/proc_list_constraints.c:28–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26} ConstraintsContext;
27
28static void _process_yield
29(
30 ConstraintsContext *ctx,
31 const char **yield
32) {
33 ctx->yield_type = NULL;
34 ctx->yield_label = NULL;
35 ctx->yield_status = NULL;
36 ctx->yield_properties = NULL;
37 ctx->yield_entity_type = NULL;
38
39 int idx = 0;
40 for(uint i = 0; i < array_len(yield); i++) {
41 if(strcasecmp("type", yield[i]) == 0) {
42 ctx->yield_type = ctx->out + idx;
43 idx++;
44 continue;
45 }
46
47 if(strcasecmp("label", yield[i]) == 0) {
48 ctx->yield_label = ctx->out + idx;
49 idx++;
50 continue;
51 }
52
53 if(strcasecmp("properties", yield[i]) == 0) {
54 ctx->yield_properties = ctx->out + idx;
55 idx++;
56 continue;
57 }
58
59 if(strcasecmp("entitytype", yield[i]) == 0) {
60 ctx->yield_entity_type = ctx->out + idx;
61 idx++;
62 continue;
63 }
64
65 if(strcasecmp("status", yield[i]) == 0) {
66 ctx->yield_status = ctx->out + idx;
67 idx++;
68 continue;
69 }
70 }
71}
72
73static void _EmitConstraint
74(

Callers 1

Proc_ConstraintsInvokeFunction · 0.70

Calls 1

array_lenFunction · 0.85

Tested by

no test coverage detected