I'm wanting to use Firebase to select calendar events which have either already started but haven't ended, or which start within the next 6 months.
In pseudo-SQL, what I'm wanting is:
WHERE `start` < {6 months from now} AND `end` > {now}
The problem is, I know how to get one of these use cases, but not both:
firebase.orderByChild('start').endAt(+new Date() + 15724800000)
firebase.orderByChild('end').startAt(+new Date())
If I attempt to combine the two, I get the following error:
Uncaught Error: Query.orderByChild: You can't combine multiple orderBy calls.
I'm not wanting to execute two queries in order to filter the list down. There will only likely be a couple of results which match the query I'm wanting, but there may be millions of results which match either of the queries by themselves.