You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge changes from upstream v1.7.3, v1.7.4 and v1.8.0:
Support for $elemMatch find operator
Support for $min and $max update operators
If false/undefined/null is passed as callback to CRUD functions, the executor doesn't get stuck anymore.
Timestamped databases now keep createdAt after an update that's a complete document replacement.
Fixed edge behavior where in updates false/undefined/null fields were treated as non-existent fields and replaced by a nested object when dot-notation was followed. For example for the document { nested: false } and the update query { $set: { 'nested.really': 42 } }, NewDB was wronlgy returning { nested: { really: 42 } } and now returns { nested: false }.
Fixed edge behavior where in updated nested objects were created on the fly while following dot notation for $unset modifier. For example for the document { hello: 'world' } and the query { $unset: { 'nested.really': true } }, NeDB was wrongly returning { hello: 'world', nested: {} } and now returns { hello: 'world' }.
Projection work with embedded documents and dot notation.
BREAKING update callback signature is now coherent in all cases.
v1.6 and onwards signature: (err, numAffected, affectedDocuments, upsert)
For an upsert, affectedDocuments contains the inserted document and the upsert flag is set to true.
For a standard update with returnUpdatedDocs flag set to false, affectedDocuments is not set.
For a standard update with returnUpdatedDocs flag set to true and multi to false, affectedDocuments is the updated document.
For a standard update with returnUpdatedDocs flag set to true and multi to true, affectedDocuments is the array of updated documents.
v1.5.1 and prior signature: (err, numAffected, affectedDocuments)
For an upsert, affectedDocuments is the inserted document and no upsert flag is set.
For a standard update with returnUpdatedDocs set to true the array of updated documents is returned, even if multi is false.