Files
meteor/packages/mongo
David Glasser f65035e11a oplog: re-fetch on confusing modifiers
For example, 5ddf203 stops us from understanding $sets and $unsets with
empty field parts, but pre-2.6 MongoDB could generate them.  (And even
post-2.6 may be able to generate $unsets with bad field names, but it's
not important for us to match that behavior since with Minimongo you
shouldn't be able to put them in in the first place.)
2015-03-05 19:56:42 -08:00
..
2014-08-28 11:14:40 -07:00
2014-08-29 15:21:26 -07:00
2014-08-28 11:14:40 -07:00
2015-02-10 12:16:02 -08:00
2015-02-27 12:00:25 -08:00

mongo

The mongo package is a full stack database driver that provides several paramount pieces of functionality to work with MongoDB in Meteor:

  • an efficient Livequery implementation providing real-time updates from the database by consuming the MongoDB replication log
  • a fall-back Livequery implementation for cases when the replication log is not available, implemented by polling the database
  • DDP RPC end-points for updating the data from clients connected over the wire
  • Serialization and deserialization of updates to the DDP format

To learn more about Livequery, see the project page on www.meteor.com.

Direct access to npm mongodb API

On the server, the mongo package is implemented using the npm mongodb module. If you'd like direct access to this module, you can find it at MongoInternals.NpmModules.mongodb.module. Its version can be read at MongoInternals.NpmModules.mongodb.version.

Additionally, you can call c.rawCollection() or c.rawDatabase() on any Mongo.Collection to get the object from the npm mongodb module corresponding to the collection or database. This is documented at http://mongodb.github.io/node-mongodb-native/

The version of mongo used may change incompatibly from version to version of Meteor (or we may even replace it with an entirely different implementation); use at your own risk.