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

Function build_ast_and_plan

tests/unit/test_execution_plan_clone.c:26–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24#include "acutest.h"
25
26static void build_ast_and_plan
27(
28 const char *query,
29 AST **ast,
30 ExecutionPlan **plan
31) {
32 QueryCtx *ctx = QueryCtx_GetQueryCtx();
33 ctx->query_data.query_no_params = query;
34 cypher_parse_result_t *parse_result = cypher_parse(query, NULL, NULL, CYPHER_PARSE_ONLY_STATEMENTS);
35 *ast = AST_Build(parse_result);
36 *plan = ExecutionPlan_FromTLS_AST();
37}
38
39static void _fake_graph_context() {
40 GraphContext *gc = (GraphContext *)calloc(1, sizeof(GraphContext));

Callers 1

Calls 3

QueryCtx_GetQueryCtxFunction · 0.85
AST_BuildFunction · 0.85

Tested by

no test coverage detected