Skip to content

Combine multiple filters with logical/boolean operation #18535

Answered by GaryAustin1
EskelCz asked this question in Questions
Discussion options

You must be logged in to vote

Several ways. You can use .or() with various logic combos in it and if you don't separate them with a comma then it will run as one big logic statement.

You can also do conditional filtering which is probably an easier way. With that method you just chain the filters based on their value being present to the query and then await the query to execute it.

https://supabase.com/docs/reference/javascript/using-filters?example=conditional-chaining

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@GaryAustin1
Comment options

@EskelCz
Comment options

Answer selected by EskelCz
Comment options

You must be logged in to vote
4 replies
@GaryAustin1
Comment options

@RafaelCENG
Comment options

@GaryAustin1
Comment options

@RafaelCENG
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants