Skip to content

When specifying 'or' as the query parameter the sql shows an 'and' clause, why is this? #2463

Answered by steve-chavez
atreeon asked this question in Q&A
Discussion options

You must be logged in to vote

You need to put it as:

employees?or=(employee_id.eq.6,employee_id=gt.4)

Check https://postgrest.org/en/stable/api.html#logical-operators

Multiple conditions on columns are evaluated using AND by default

That applies because your or has a single value

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by atreeon
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2462 on September 03, 2022 18:02.