-
Notifications
You must be signed in to change notification settings - Fork 25
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
upsert bulk function #57
Comments
Just faced this issue and did this: Promise.all(notes.map(note => db.upsert(note.docId, doc => {
doc.syncCursorId = syncCursorId
return doc
})).then(results => console.log(results)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a problem similar to https://stackoverflow.com/questions/44357946/update-more-than-one-document-in-a-loop and I tried to solve it as described in the last answer. But it doesn't work, because when the upsert diffFunc enter the external loop is ended and v1...v6 are valued by the last loop iteration. Is it possible to get the id value inside the upsert diffFunc? Do you can suggest any other solution? The last comment in the post is mine (Alessandra).
The text was updated successfully, but these errors were encountered: