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

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -