I am trying to write query to firebase that get posts by posterId
and for specified date range.
Dates
are stored as number
.
reference.child("posts")
.queryOrderedByChild(posterId)
.queryStartingAtValue(1483706035, childKey: "postedOnDate")
.queryEndingAtValue(1483707046)
.queryEqualToValue("-KasdASDHGASasdsa986")
.observeEventType(...
I am getting error:
'InvalidQueryParameter', reason: 'Can't call queryEqualToValue: after queryStartingAtValue, queryEndingAtValue or queryEqualToValue was previously called'
If I remove queryEqualToValue
I don't get error but I don't get data neither.
What I did wrong in my query, or what I am missing in this query?
It's simple query don't know why it doesn't work.