swift - Observing data that saved with childByAutoId -


i using childbyautoid save each message in firebase.

now when observing data, want each query 10 older messages using .querystarting(atvalue: ) .queryending(atvalue: )

is possible childbyautoid? thanks

sure. that's not best practice - don't query key. query child in node.

messages   -y8hji98jasdjkas     datestamp: "20170405"   -yin99s9ks9kksok     datestamp: "20170407"   -y7iijs9jsk9999j     datestamp: "20170409"  queryordered(bychild: "datestamp").querystarting(atvalue: "20170405")                                   .queryending(atvalue: "20170408") 

will retrive these 2 older child nodes

  -y8hji98jasdjkas     datestamp: "20170405"   -yin99s9ks9kksok     datestamp: "20170407" 

Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -