(function() { | |
var MongoClient, config; | |
config = require('../config.js'); | |
MongoClient = require('mongodb').MongoClient; | |
MongoClient.connect("mongodb://127.0.0.1:27017/" + config.General.database, function(err, db) { | |
var callback, callbackOne; | |
callback = function(err, hands) { | |
if (err) { | |
throw err; | |
} | |
return console.log('find:' + hands.length); | |
}; | |
callbackOne = function(err, hands) { | |
if (err) { | |
throw err; | |
} | |
return console.log('findOne:' + hands); | |
}; | |
db.collection('hands').find({ | |
"processed": null | |
}).toArray(callback); | |
db.collection('hands').findOne({ | |
"processed": null | |
}, callbackOne); | |
return db.collection('hands').count({ | |
"processed": null | |
}, function(err, c) { | |
return console.log('count:' + c); | |
}); | |
}); | |
}).call(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment