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

Non-macro alternative to Ash.Query.filter #1092

Open
vonagam opened this issue May 2, 2024 · 0 comments
Open

Non-macro alternative to Ash.Query.filter #1092

vonagam opened this issue May 2, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@vonagam
Copy link
Contributor

vonagam commented May 2, 2024

All Ash.Query modifications - select, sort, limit, offset, build and so on - are usual methods. Except one, the most used - filter - it is a macro. So it needs a require statement to be used. Which is a little bit annoying when you want to add a simple filter and only once in a file... I just go for build(filter:) combo in that case.

Would be convenient to have non-macro variant of filter exposed (which is do_filter). Maybe under name where?

In small discussion on Discord the following proposal was made: add where in Ash 3.1 (because there are too many things already in Ash 3 and it is too late to change filter to non-macro method even though it is desirable) and make it a primary way to add filters to queries in docs, then in Ash 4 deprecate filter.

@vonagam vonagam added enhancement New feature or request needs review labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants