adds node to query graph
| 35 | |
| 36 | // adds node to query graph |
| 37 | static void _QueryGraphAddNode |
| 38 | ( |
| 39 | QueryGraph *qg, |
| 40 | const cypher_astnode_t *ast_entity |
| 41 | ) { |
| 42 | const char *alias = AST_ToString(ast_entity); |
| 43 | |
| 44 | // look up this alias in the QueryGraph |
| 45 | // this node may already exist |
| 46 | // if it appears multiple times in query patterns |
| 47 | QGNode *n = QueryGraph_GetNodeByAlias(qg, alias); |
| 48 | if(n == NULL) { |
| 49 | // node has not been mapped; create it |
| 50 | n = QGNode_New(alias); |
| 51 | QueryGraph_AddNode(qg, n); |
| 52 | } |
| 53 | |
| 54 | _QueryGraphSetNodeLabel(n, ast_entity); |
| 55 | } |
| 56 | |
| 57 | // adds edge to query graph |
| 58 | static void _QueryGraphAddEdge |
no test coverage detected