Skip to content

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

@vonagam

Description

@vonagam

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Soon

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions