I am in the process of converting from Realm-Java to Realm-Kotlin, and I had a question about grouping queries/filter. Right now I have my realm-java code return a realm result that matches 2 possible sets of queries.
return list.where{ //group 1
($0.quadrant == quadrant &&
$0.due_date < Date() &&
$0.due_date != nil &&
$0.complete == false &&
$0.deleted == false)
|| //or
// group 2
($0.quadrant == "q2" &&
$0.due_date < Date() &&
$0.due_date != nil &&
$0.complete == false &&
$0.deleted == false)}
How would I write this in realm-kotlin so that it will return result that are either in group 1’s queries or group 2’s queries?
Thanks