Documentation: Add details on how to use parentheses in SELECT .. WHERE queries #973
Open
2 tasks done
Labels
documentation
Improvements or additions to documentation
Description
I just spent a while trying to figure out how to filter a graph SELECT query based on the noun table fields rather than the edge table metadata.
SQL-like query
SELECT * FROM posts WHERE author_id = users:123 AND date_published > '2024-01-01
The docs only show something like this Graph-like query
SELECT -> (wrote WHERE date_published > '2024-01-01') -> posts FROM users:123
But if you don't have that date_published metadata, you'd want to do
SELECT -> wrote -> ( posts WHERE date_published > '2024-01-01' ) FROM users:123
Perhaps I'm just dumb, but it took me a while to realize that I could do that - just wrap any of the graph query parameters with
( )
and use SQL-like WHERE etc inside. I thought it was exclusive to the edge table, though really should have been obvious since I assume that a table is a table.Anyway, It would be good to add some details in the
SELECT
and/orRELATE
docs about how to do this.Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: