Reply with a string representation of given execution plan.
| 29 | |
| 30 | // Reply with a string representation of given execution plan. |
| 31 | void 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 |
no test coverage detected