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

Document the need to use double embedding when doing OR filtering across embeds #3405

Open
laurenceisla opened this issue Apr 12, 2024 · 0 comments
Labels
docs Only related to documentation

Comments

@laurenceisla
Copy link
Member

laurenceisla commented Apr 12, 2024

For example, when a user wants to get info from table with an embedded rel where table.col=val OR where rel.rel_col=val, they do this:

/table?select=*,rel(*)&rel.rel_col=eq.val&or=(base_col.eq.val,rel.not.is.null)

But this will return {"rel": null} when the table.col=val is fulfilled and when rel.rel_col=val is not. This is intended, but the user usually wants to show the values of rel even if it doesn't satisfy rel.rel_col=val, which is solved by embedding twice:

/table?select=*,r:rel(),rel(*)&r.rel_col=eq.val&or=(base_col.eq.val,r.not.is.null)

We may need to add an explanation to the OR across embeds section since it has been asked quite often recently, e.g.:

@laurenceisla laurenceisla added the docs Only related to documentation label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Only related to documentation
Development

No branches or pull requests

1 participant