Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: Add details on how to use parentheses in SELECT .. WHERE queries #973

Open
2 tasks done
nickchomey opened this issue Nov 1, 2024 · 1 comment
Open
2 tasks done
Labels
documentation Improvements or additions to documentation

Comments

@nickchomey
Copy link

nickchomey commented Nov 1, 2024

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/or RELATE docs about how to do this.

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@nickchomey nickchomey added the documentation Improvements or additions to documentation label Nov 1, 2024
@nickchomey
Copy link
Author

Somewhat related - it would be useful to have details on how to return specific fields from each table in a multi-step relation query

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant