-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Added positional operator ($) support when updating documents. #438
base: master
Are you sure you want to change the base?
Conversation
Heavily inspired by the work of github user mitsos1os.
@HowlingGuineapig I was planning to restructure my commits with the form required by the author but I was completely out of free time. I hope you get to add this feature in this good project! |
Hi @HowlingGuineapig, will it work to change an object property inside an array of objects? Like in the example below: db.update({ 'objects.anyIdentifier': 'id' }, { $set: { 'objects.$.anyProperty': 'newValue' } }, {}, function () { |
…xOf() because of compatability issues
Hi @Rodzero, yes that is exactly the sort of thing I made this pull request for, but I made a mistake when writing the README. I tried to make the entry look like all those around it and instead wrote an example that just doesn't work. I have fixed the README now with a working example that looks a bit more like yours. Thanks for pointing it out. |
Merged into nedb3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow ! That is exactly what I need... thank you
Heavily inspired by the work of @mitsos1os, I needed this feature for a project but it was lost amongst a large set of commits and never pulled. Hopefully this fits the guidelines, let me know what you think.