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

Function QueryCtx_SetGlobalExecutionCtx

src/query_ctx.c:167–186  ·  view source on GitHub ↗

sets the global execution context

Source from the content-addressed store, hash-verified

165
166// sets the global execution context
167void QueryCtx_SetGlobalExecutionCtx
168(
169 CommandCtx *cmd_ctx
170) {
171 ASSERT(cmd_ctx != NULL);
172
173 QueryCtx *ctx = _QueryCtx_GetCreateCtx();
174
175 ctx->gc = CommandCtx_GetGraphContext(cmd_ctx);
176 ctx->query_data.query = CommandCtx_GetQuery(cmd_ctx);
177 ctx->global_exec_ctx.bc = CommandCtx_GetBlockingClient(cmd_ctx);
178 ctx->global_exec_ctx.redis_ctx = CommandCtx_GetRedisCtx(cmd_ctx);
179 ctx->global_exec_ctx.command_name = CommandCtx_GetCommandName(cmd_ctx);
180
181 // copy command's timer
182 simple_timer_copy(cmd_ctx->timer, ctx->stats.timer);
183
184 // received timestamp (epoch time)
185 ctx->stats.received_ts = cmd_ctx->received_ts;
186}
187
188// set the provided AST for access through the QueryCtx
189void QueryCtx_SetAST

Callers 2

_queryFunction · 0.85
Graph_ExplainFunction · 0.85

Calls 7

_QueryCtx_GetCreateCtxFunction · 0.85
CommandCtx_GetQueryFunction · 0.85
CommandCtx_GetRedisCtxFunction · 0.85
simple_timer_copyFunction · 0.85

Tested by

no test coverage detected