extracts edge from 'qg' and places a copy of into 'graph'
| 181 | |
| 182 | // extracts edge from 'qg' and places a copy of into 'graph' |
| 183 | static void _QueryGraph_ExtractEdge |
| 184 | ( |
| 185 | const QueryGraph *qg, |
| 186 | QueryGraph *graph, |
| 187 | QGNode *left, |
| 188 | QGNode *right, |
| 189 | const cypher_astnode_t *ast_edge |
| 190 | ) { |
| 191 | const char *alias = AST_ToString(ast_edge); |
| 192 | |
| 193 | // validate input, edge shouldn't be in graph |
| 194 | ASSERT(left != NULL); |
| 195 | ASSERT(right != NULL); |
| 196 | ASSERT(QueryGraph_GetEdgeByAlias(graph, alias) == NULL); |
| 197 | |
| 198 | QGEdge *e = QueryGraph_GetEdgeByAlias(qg, alias); |
| 199 | bool shortest_path = e ? e->shortest_path : false; |
| 200 | _QueryGraphAddEdge(graph, ast_edge, left, right, shortest_path); |
| 201 | } |
| 202 | |
| 203 | // clones path from 'qg' into 'graph' |
| 204 | static void _QueryGraph_ExtractPath |
no test coverage detected