Skip to content
Adds a compatibility layer to Mongoose v3 to regain most of the API sugar from Mongoose v2
JavaScript
Find file
Latest commit 449f2d1 Jun 20, 2012 @aheckmann release 0.0.2
Failed to load latest commit information.
lib more deprecated methods Jun 14, 2012
test more deprecated methods Jun 15, 2012
.gitignore initial commit May 30, 2012
History.md release 0.0.2 Jun 20, 2012
LICENSE initial commit May 30, 2012
Makefile initial commit May 30, 2012
README.md README Jun 14, 2012
index.js initial commit May 30, 2012
package.json release 0.0.2 Jun 20, 2012

README.md

mongoose-v2-compat

Adds a compatibility layer to Mongoose v3 to regain most of the API sugar from Mongoose v2.

install

npm install mongoose-v2-compat

Example:

require('mongoose-v2-compat');
var mongoose = require('mongoose');
mongoose.compat = true;

// now we can use all the old methods
mongoose.connectSet('...');

Thing.where('tags').$in(array).asc('name').run(callback);

Provided methods

  • Query#$or
  • Query#$nor
  • Query#$gt
  • Query#$gte
  • Query#$lt
  • Query#$lte
  • Query#$ne
  • Query#$in
  • Query#$nin
  • Query#$all
  • Query#$regex
  • Query#$size
  • Query#$maxDistance
  • Query#$mod
  • Query#$near
  • Query#$exists
  • Query#$elemMatch
  • Query#$within
  • Query#$box
  • Query#$center
  • Query#$centerSphere
  • Query#$slice
  • Query#run
  • Query#notEqualTo
  • Query#wherein
  • Query#fields
  • Query#asc
  • Query#desc
  • mongoose.createSetConnection
  • mongoose.connectSet
  • document#commit
  • MongooseArray#$push
  • MongooseArray#$pushAll
  • MongooseArray#$pull
  • MongooseArray#$pullAll
  • MongooseArray#$unshift
  • MongooseArray#$addToSet

tests

Run the tests with make test.

LICENSE

Something went wrong with that request. Please try again.