2.x.x is a significant change to the API. We've moved away from callbacks and are exclusively using async/await. The most important changes to be aware of are:
[x] The minimum supported driver is mongodb@3.x.x
[x] Callbacks are gone everything is async/await.
[x] The property constructWithSchema has been removed. The default behavior is to always construct with the schema.
[x] The constructor will throw if there was a validation error.
[x] The property collection has been renamed to collectionName.
[x] The connect method now expects a connection object with keys uri and db.
[x] The pagedFind method no longer accepts the fields or sort arguments. Use the options argument instead.
[x] For some methods that pulled information out of the result documents (like the count of records affected) now simply return the result document from the MongoDB driver. Review your usage of: deleteMany, deleteOne, replaceOne, updateMany, updateOne.
It's very possible that I've not mentioned something important that changed. Please mention anything you think should be clarified.
2.x.x is a significant change to the API. We've moved away from callbacks and are exclusively using
async
/await
. The most important changes to be aware of are:mongodb@3.x.x
async
/await
.constructWithSchema
has been removed. The default behavior is to always construct with the schema.collection
has been renamed tocollectionName
.connect
method now expects aconnection
object with keysuri
anddb
.pagedFind
method no longer accepts thefields
orsort
arguments. Use theoptions
argument instead.deleteMany
,deleteOne
,replaceOne
,updateMany
,updateOne
.It's very possible that I've not mentioned something important that changed. Please mention anything you think should be clarified.