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

intelligent event listeners #13

Open
Orlandster opened this issue Oct 1, 2017 · 0 comments
Open

intelligent event listeners #13

Orlandster opened this issue Oct 1, 2017 · 0 comments
Assignees
Milestone

Comments

@Orlandster
Copy link
Owner

Till now each time an event fires the whole query gets executed. Since Firebase returns the push key of the modified child, we are able to simply add / update or reomve this child.

e.g. active query

result = [entry1: { name: "john" }, entry2: { name: "misterX" }]

entry3 gets added -> get value (already in event callback) -> run through query -> push to array
entry2 gets updated -> get value - run through query -> add, remove or delete it in array
entry2 gets deleted -> get key -> delete it from array

This implementation should be very easy. Probably there should also be some kind of queue to avoid conflicts.

@Orlandster Orlandster self-assigned this Oct 1, 2017
@Orlandster Orlandster added this to the 0.2.0 milestone Oct 6, 2017
@Orlandster Orlandster modified the milestones: 0.2.0, 1.0.0 Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant