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

Function GraphQueryCtx_New

src/commands/cmd_query.c:35–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33} GraphQueryCtx;
34
35static GraphQueryCtx *GraphQueryCtx_New
36(
37 GraphContext *graph_ctx,
38 RedisModuleCtx *rm_ctx,
39 ExecutionCtx *exec_ctx,
40 CommandCtx *command_ctx,
41 QueryExecutionTypeFlag flags,
42 CronTaskHandle timeout
43) {
44 GraphQueryCtx *ctx = rm_malloc(sizeof(GraphQueryCtx));
45
46 ctx->rm_ctx = rm_ctx;
47 ctx->exec_ctx = exec_ctx;
48 ctx->graph_ctx = graph_ctx;
49 ctx->query_ctx = QueryCtx_GetQueryCtx();
50 ctx->query_ctx->flags = flags;
51 ctx->command_ctx = command_ctx;
52 ctx->timeout = timeout;
53
54 return ctx;
55}
56
57static void inline GraphQueryCtx_Free
58(

Callers 1

_queryFunction · 0.85

Calls 2

rm_mallocFunction · 0.85
QueryCtx_GetQueryCtxFunction · 0.85

Tested by

no test coverage detected