Validate that the relation alias of an edge is not bound
| 281 | |
| 282 | // Validate that the relation alias of an edge is not bound |
| 283 | static AST_Validation _ValidateCreateRelation |
| 284 | ( |
| 285 | const cypher_astnode_t *entity, // ast-node |
| 286 | rax *defined_aliases // bounded variables |
| 287 | ) { |
| 288 | const cypher_astnode_t *identifier = cypher_ast_rel_pattern_get_identifier(entity); |
| 289 | if(identifier) { |
| 290 | const char *alias = cypher_ast_identifier_get_name(identifier); |
| 291 | if(raxFind(defined_aliases, (unsigned char *)alias, strlen(alias)) != raxNotFound) { |
| 292 | ErrorCtx_SetError("The bound variable '%s' can't be redeclared in a CREATE clause", alias); |
| 293 | return AST_INVALID; |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | return AST_VALID; |
| 298 | } |
| 299 | |
| 300 | // Validate each entity referenced in a single path of a CREATE clause. |
| 301 | static AST_Validation _Validate_CREATE_Entities |
no test coverage detected