Use parentheses in filtered query


#1

Hello There,

To build a complex query for filtered method, can we use parentheses in queries. For e.g.
realm.objects(‘Product’).filtered(’[productType == ‘cola’ OR productType == ‘pepsi’]’ AND ‘[productName == ‘7up’ OR productName == ‘sugarFree’]’)

Is above example is valid query?


#2

The following example appears to work:

`_id != ‘${id}’ AND (name CONTAINS[c] ‘${queryString}’ OR handle CONTAINS[c] ‘${queryString}’)`