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

Function test_matchClause

tests/unit/test_execution_plan_clone.c:159–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159void test_matchClause() {
160 const char **queries = array_new(const char *, 9);
161 array_append(queries, "MATCH (n) RETURN n"); // All node scan
162 array_append(queries, "MATCH (n:N) RETURN n"); // Label scan
163 array_append(queries, "MATCH (n) WHERE id(n) = 0 RETURN n"); // ID Scan
164 array_append(queries, "MATCH (n)-[]->() RETURN n"); // Conditional traverse, referenced src node.
165 array_append(queries, "MATCH (n)-[e]->() RETURN n"); // Conditional traverse, referenced src node and edge.
166 array_append(queries, "MATCH p = ()-[]->() RETURN p"); // Named path, conditional traverse
167 array_append(queries, "MATCH (n)-[*]->() RETURN n"); // Variable length traverse.
168 array_append(queries, "MATCH p = ()-[*]->() return p"); // Named path, variable length traverse.
169 array_append(queries, "MATCH (n) WHERE (n)-[:R]->() AND NOT (n)-[:R2]->() RETURN n"); // Apply ops.
170
171 validate_query_plans_clone(queries);
172 array_free(queries);
173}
174
175void test_updateClause() {
176 const char **queries = array_new(const char *, 2);

Callers

nothing calls this directly

Calls 2

array_freeFunction · 0.85

Tested by

no test coverage detected