Created
October 18, 2012 22:29
-
-
Save aheckmann/3915158 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongo = require('mongodb') | |
pure = require('mongodb').pure(); | |
native = require('mongodb').native(); | |
mongo.Db.connect('mongodb://localhost/native-gh-749?poolSize=2&safe=true', function (err, db) { | |
console.log('connected'); | |
db.collection('stuff').findOne(function (err, doc) { | |
console.log(doc._id instanceof pure.ObjectID); //true | |
console.log(doc._id instanceof native.ObjectID); //true | |
console.log(doc._id._bsontype); //ObjectID | |
db.close(); | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment