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

Function _process_yield

src/procedures/proc_ss_paths.c:87–116  ·  view source on GitHub ↗

initialize returned values pointers

Source from the content-addressed store, hash-verified

85
86// initialize returned values pointers
87static void _process_yield
88(
89 SingleSourceCtx *ctx,
90 const char **yield
91) {
92 ctx->yield_path = NULL;
93 ctx->yield_path_weight = NULL;
94 ctx->yield_path_cost = NULL;
95
96 int idx = 0;
97 for(uint i = 0; i < array_len(yield); i++) {
98 if(strcasecmp("path", yield[i]) == 0) {
99 ctx->yield_path = ctx->output + idx;
100 idx++;
101 continue;
102 }
103
104 if(strcasecmp("pathWeight", yield[i]) == 0) {
105 ctx->yield_path_weight = ctx->output + idx;
106 idx++;
107 continue;
108 }
109
110 if(strcasecmp("pathCost", yield[i]) == 0) {
111 ctx->yield_path_cost = ctx->output + idx;
112 idx++;
113 continue;
114 }
115 }
116}
117
118// make sure context level array have 'cap' available entries.
119static void _SingleSourceCtx_EnsureLevelArrayCap

Callers 1

Proc_SSpathsInvokeFunction · 0.70

Calls 1

array_lenFunction · 0.85

Tested by

no test coverage detected