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

Function _fake_graph_context

tests/unit/test_execution_plan_clone.c:39–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39static void _fake_graph_context() {
40 GraphContext *gc = (GraphContext *)calloc(1, sizeof(GraphContext));
41
42 gc->g = Graph_New(16, 16);
43
44 gc->ref_count = 1;
45 gc->index_count = 0;
46 gc->graph_name = strdup("G");
47 gc->attributes = raxNew();
48 gc->string_mapping = (char**)array_new(char*, 64);
49 gc->node_schemas = (Schema**)array_new(Schema*, GRAPH_DEFAULT_LABEL_CAP);
50 gc->relation_schemas = (Schema**)array_new(Schema*, GRAPH_DEFAULT_RELATION_TYPE_CAP);
51 gc->queries_log = QueriesLog_New();
52
53 pthread_rwlock_init(&gc->_attribute_rwlock, NULL);
54 QueryCtx_SetGraphCtx(gc);
55}
56
57static void ExecutionPlan_OpsEqual
58(

Callers 1

setupFunction · 0.70

Calls 3

Graph_NewFunction · 0.85
QueriesLog_NewFunction · 0.85
QueryCtx_SetGraphCtxFunction · 0.85

Tested by

no test coverage detected