Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

m.ref(endPoint).once('value') retrieves data in reverse order (Last in Last out) contrary to firebase realtime database data retrieval model (First in First out - Queue) #5

Open
joshuapro14 opened this issue Oct 25, 2019 · 1 comment

Comments

@joshuapro14
Copy link

Thanks for writing a wonderful API; I was trying to use it in my test scenarios to mock communications to firebase realtime database.

I have found that retrieval of collection from an end point using once('value') retrieves data in reverse order (Last in Last out - stack) instead of First in First out (Queue).

@yankeeinlondon
Copy link
Member

yankeeinlondon commented Apr 25, 2020

Good catch; sorry I didn't see this issue until now. I am wondering if you have a list of values why not use a child listener? This is more typical. In JS -- strictly speaking -- there are no guarentees of a "natural sort order" to objects though many/most implementations return based on the order of the keys (which of course holds meaning in Firebase).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants