Skip to content

Feature: use whereIn when filtering #1300

@GonzaloGPF

Description

@GonzaloGPF

Is your feature request related to a problem? Please describe.

The Query feature is very handly and useful, however, sometimes you need to filter by multiple values too.
For example: Give me all users with name 'John' or 'Bob'.

Describe the solution you'd like

It would be great if it accepts array version of all allowed filters:

  • /users?name=John: Filter users with name John (will use a where)
  • /users?name=John&name=Bob: Filter users with name John or Bob (will use a whereIn)

Describe alternatives you've considered

Maybe, it would be great to have a mechanism to 'extend' filtering setup, generating 'plural' version of allowed fields:

  • /users?name=John: Filter users with name John (will use a where)
  • /users?names=John,Bob: Filter users with name John or Bob (will use a whereIn)

That's all, thx!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions