Search code examples
postgrest

OR operation with postgREST API


Consider I have two columns using which I want to fetch the rows. The condition would be

WHERE column1="test" OR column2="test"

How do I achieve this with postgREST API?


Solution

  • Your request would be:

    GET /table?or=(column1.eq.test,column2.eq.test) HTTP/1.1
    

    The recently added Logical Operators section in the docs has a more practical example.