I'm trying to query by the "genre": "Arts & Humanities" but also need the queryEnding to paginate my data based on the timestamp.
However, we can't use both of them combined in Xcode. What's another method?
Here's what I'm trying: (not working)
queryRef = ref.queryOrdered(byChild: "genre").queryEqual(toValue: "Arts & Humanities").queryEnding(atValue: lastTimestamp)
Here's the code I use to paginate my data. Works fine, but I can't sort the pagination with data only for "Arts & Humanities". this will paginate my entire feed.
        var queryRef:DatabaseQuery
        let lastPost = self.postList.last
        if lastPost != nil {
            let lastTimestamp = lastPost!.createdAt.timeIntervalSince1970 * 1000
            queryRef = ref.queryOrdered(byChild: "timestamp").queryEnding(atValue: lastTimestamp)
        } else {
            queryRef = ref.queryOrdered(byChild: "timestamp")
        }