sharedb-mongo is currently using the 2.x Mongo driver out of the box.
The Mongo driver has been on 3.x for a while now, but from the 3.x release notes, it does introduce some breaking changes that would impact sharedb-mongo.
That includes:
MongoClient.connect(connectionString, callback) results in a mongodb.Db instance in 2.x, and it results in a mongodb.MongoClient instance in 3.x.
mongodb.Collection#aggregate results in a result array in 2.x, and it results in a mongodb.AggregationCursor in 3.x.
- The results of
mongodb.Collection#mapReduce may have changed in an incompatible way.
To be safe, sharedb-mongo should major version when officially upgrading to mongodb@3.x.
It is possible today to pass a mongodb.Db provider function when constructing a ShareDBMongo, which could allow you to use a 3.x Mongo driver since you skip sharedb-mongo creating its own connection. I think everything would work except aggregations.
It might be possible to make forward-compatible changes to support 3.x drivers, prior to major-versioning sharedb-mongo to officially switch to 3.x.
sharedb-mongo is currently using the 2.x Mongo driver out of the box.
The Mongo driver has been on 3.x for a while now, but from the 3.x release notes, it does introduce some breaking changes that would impact sharedb-mongo.
That includes:
MongoClient.connect(connectionString, callback)results in amongodb.Dbinstance in 2.x, and it results in amongodb.MongoClientinstance in 3.x.mongodb.Collection#aggregateresults in a result array in 2.x, and it results in amongodb.AggregationCursorin 3.x.mongodb.Collection#mapReducemay have changed in an incompatible way.To be safe, sharedb-mongo should major version when officially upgrading to
mongodb@3.x.It is possible today to pass a
mongodb.Dbprovider function when constructing a ShareDBMongo, which could allow you to use a 3.x Mongo driver since you skip sharedb-mongo creating its own connection. I think everything would work except aggregations.It might be possible to make forward-compatible changes to support 3.x drivers, prior to major-versioning sharedb-mongo to officially switch to 3.x.