Skip to content

Query.on('remove') to provide document contents instead of empty data #146

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

Open
nickasd opened this issue Apr 25, 2017 · 0 comments
Open

Comments

@nickasd
Copy link

nickasd commented Apr 25, 2017

In my scenario I have a subscribe query which notifies me about inserted and removed documents in a collection. I also have a tree data structure (a filesystem) in which I store these documents (see #145).
The problem is that when the query notifies me of one or more document removals, I'm unable to efficiently update the tree since the documents' data fields (which store information about where the document is stored inside the tree) have already been undefined. The current workaround is, for each removed document, to traverse the whole tree by comparing each stored document with the removed one. Instead it would be nice if the documents' data fields were emptied only after firing the event.

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

1 participant