Multiple posible conditions realm query


#1

Say I have 3 choices of sorting.

Dog class have 3 kinds

  • Bulldog
  • Poodle
  • Pug

Base on 3 selection, I guess I have 9 combination?(not sure). Do you have to use a lot of if statements to sort and query the result? Say on the example I want to display Bulldog and poodle? or If anything is not selected I will have to show all of the list of dog registered. What if I have 10 selections each with different combination selection. Do you use if statements for all of those? That is like 100 possible combination. Is there any other way to query realm with other possible combinations?


#2

@skadush Take a look here:

We support complex predicate based queries. So you could do something like dog.type==bulldog OR dog.type==poodle