First of all, I already saw : this answer, and other answers.They don't responde to my question.
I haee a pretty long list of events:
{
"event1": {
"date" : 1420753443,
"name" : "name1"
},
"event2": {
"date" : 1429053443,
"name" : "name2"
}
}
I need (if possible) to get the events between two indexes (not dates), but ordered by date.
For example, I tried to intersect two lists in order to accomplish my goal:
let query = this.databaseRef
.orderByChild('date')
.limitToFirst(100)
.limitToLast(100);
but an error is thrown
Also, some events can be at the same time. Because of that, I can't use the last date on the previous page to query the events for the next page
let query = this.databaseRef
.orderByChild('date')
.startAt(oldDate)
.limitToFirst(10);
My purpose is to get from firebase as much items as needed to be sown on user's screen: first the items in range 0-9, second 10-19 etc..