Skip to content

Commit

Permalink
Add grammar rule for create property graph if not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Dtenwolde committed Dec 19, 2024
1 parent 0c82f0e commit c380346
Show file tree
Hide file tree
Showing 2 changed files with 20,257 additions and 20,180 deletions.
14 changes: 13 additions & 1 deletion third_party/libpg_query/grammar/statements/pgq.y
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,19 @@ CreatePropertyGraphStmt:
$$ = (PGNode *)n;
}
;

|
CREATE_P PROPERTY GRAPH IF_P NOT EXISTS qualified_name
VertexOrNode TABLES '(' VertexTableDefinition VertexTableDefinitionList ')'
EdgeTablesClauseOptional
{
PGCreatePropertyGraphStmt *n = makeNode(PGCreatePropertyGraphStmt);
n->name = $7;
n->vertex_tables = $12?lappend($12,$11):list_make1($11);
n->edge_tables = $14;
n->onconflict = PG_IGNORE_ON_CONFLICT;
$$ = (PGNode *)n;
}
;

VertexTableDefinitionList:
',' VertexTableDefinition
Expand Down
Loading

0 comments on commit c380346

Please sign in to comment.