This is the structure of my data:
ft-public-records
2015-01-01 00:00:00 GMT
addedByUser: "user@gmail.com"
rating: 1
time: "2015-01-01 00:00:00 GMT"
timestamp: 1490437551.593684
Without queryStartAt
, I can get the object without problems:
self.publicRef.child("2015-01-01 00:00:00 GMT").queryOrdered(byChild: "rating").observe(FIRDataEventType.value, with: { snapshot in
print(snapshot)
})
Result:
Snap (2015-01-01 00:00:00 GMT) {
addedByUser = "user@gmail.com";
rating = 1;
time = "2015-01-01 00:00:00 GMT";
timestamp = "1490437551.593684";
}
But the moment I add the queryStarting
at 1 for ratings, I get null.
self.publicRef.child("2015-01-01 00:00:00 GMT").queryOrdered(byChild: "rating").queryStarting(atValue: 1).observe(FIRDataEventType.value, with: { snapshot in
print(snapshot)
})
Result:
Snap (2015-01-01 00:00:00 GMT) <null>
What am I missing please?