cwida / duckpgq-extension

DuckDB extension that adds support for SQL/PGQ
https://duckpgq.notion.site/b8ac652667964f958bfada1c3e53f1bb?v=3b47a8d44bdf4e0c8b503bf23f1b76f2
MIT License
86 stars 7 forks source link

Make graph table name optional #89

Closed Dtenwolde closed 9 months ago

Dtenwolde commented 9 months ago

Currently, the graph table requires an alias (or name?) at the end of it. Similar to a subquery. This is useful if you need to continue using the columns outside the graph table. However, if all you do is select column(s) from the graph table, the name at the end is not used.

Similar to the subquery, it should be optional to name the graph table. If it is not named, it should default to something like unnamed_graph_table (in case of multiple graph tables which will be supported in the future).

-FROM GRAPH_TABLE (snb
    MATCH (p:Person)-[w:workAt_Organisation]->(u:University)
    COLUMNS (p.id, u.id, u.type)
    )
    limit 10;

Should lead to unnamed_graphtable0