mongoist icon indicating copy to clipboard operation
mongoist copied to clipboard

Update MongoDB driver to 4.8.0

Open raphaelbs opened this issue 2 years ago • 3 comments

This PR updates MongoDB from 3.3.2 to 4.8.0. This is an initiative toward adds types to this project.

References

Breaking Changes

MongoDB version

According to the compatibility table, current version 3.3.2 is compatible with MongoDB 2.6, 3, 3.2, 3.4, 3.6, 4, and 4.2.

Driver 4.8.0 is compatible with MongoDB 3.6, 4, 4.2, 4.4, 5, and 6.

Expand to see the compatibility table

image

Remove collection.group()

The same functionality can be achieved using the aggregation pipeline's $group operator.

Db name in the connection string

On this PR, dbName is not inferred from the connection string. Use the dbName option.

Old:

mongoist('localhost:27017/test')

New:

mongoist('localhost:27017', { 'dbName': 'test' })

Major changes

  • collection.count now uses countDocuments instead of cursor.count.
  • collection.mapReduce is deprecated. Kept for compatibility.
  • collection.update and collection.remove returns additional info. "n" and "ok" are deprecated.
  • cursor.count is deprecated. Kept for compatibility.

raphaelbs avatar Jul 24 '22 16:07 raphaelbs

Hey @bradvogel, can you approve the PR's workflow?

raphaelbs avatar Jul 24 '22 16:07 raphaelbs

Maybe we close this in favor of https://github.com/mongoist/mongoist/pull/97 and future work we will do in order to get support of MongoDB 6.0

dnechay avatar Jul 07 '23 10:07 dnechay

Hi! I'm waiting for this upgrade to use compressors option from MongoClient

is there any way I can help?

wbruno avatar Sep 06 '23 16:09 wbruno