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
Post a Comment