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

Function ExecutionPlan_Print

src/execution_plan/execution_plan_debug.c:31–43  ·  view source on GitHub ↗

Reply with a string representation of given execution plan.

Source from the content-addressed store, hash-verified

29
30// Reply with a string representation of given execution plan.
31void ExecutionPlan_Print(const ExecutionPlan *plan, RedisModuleCtx *ctx) {
32 ASSERT(plan && ctx);
33
34 int op_count = 0; // Number of operations printed.
35 sds buffer = sdsempty();
36
37 // No idea how many operation are in execution plan.
38 RedisModule_ReplyWithArray(ctx, REDISMODULE_POSTPONED_ARRAY_LEN);
39 _ExecutionPlan_Print(plan->root, ctx, &buffer, 0, &op_count);
40
41 RedisModule_ReplySetArrayLength(ctx, op_count);
42 sdsfree(buffer);
43}
44

Callers 2

_ExecuteQueryFunction · 0.85
Graph_ExplainFunction · 0.85

Calls 3

sdsemptyFunction · 0.85
_ExecutionPlan_PrintFunction · 0.85
sdsfreeFunction · 0.85

Tested by

no test coverage detected