Top "Node-mongodb-native" questions

The MongoDB Native Node.

How to check if a collection exists in Mongodb native nodejs driver?

I need to check if a collection exists on a certain database and create it if it doesn't. I know …

node.js mongodb node-mongodb-native
How to connect with username/password to mongodb using native node.js driver

I'm using native mongo driver in Joyent cloud, the node.js application runs fine locally but in Joyent when i …

node.js node-mongodb-native joyent
Why am I getting error "Trying to open unclosed connection."?

I am trying to connect my node app to mongodb via mongoose. It seems to be working, as I can …

node.js mongoose node-mongodb-native
Remove record by id?

Why I can't remove record by _id? Code: db.collection('posts', function(err, collection) { collection.remove({_id: '4d512b45…

node.js mongodb node-mongodb-native
MongoDB sorting by nested object value

I'm trying to sort results based on the values of a nested object. Using node-mongodb-native, I'm doing this: this.collection.…

javascript mongodb node-mongodb-native
How to query date range on the MongoDB collection where the ISO date is stored in string field?

Scenario: Consider I am having a collection called MyCollection, with following data: { "_id" : 'MyUniqueID_01' "CreatedTime" : "2013-12-01T14:35:00Z", "…

json mongodb mongodb-query bson node-mongodb-native
How can I promisify the MongoDB native Javascript driver using bluebird?

I'd like to use the MongoDB native JS driver with bluebird promises. How can I use Promise.promisifyAll() on this …

javascript mongodb promise bluebird node-mongodb-native
Bluebird Promisfy.each, with for-loops and if-statements?

Right now, the parent for-loop (m < repliesIDsArray.length) completes before the first findOne fires, so this all only loops …

node.js mongoose promise node-mongodb-native bluebird
mongodb-nodejs-driver, DeprecationWarning: collection.count is deprecated

I want to get the count of posts documents using: db.collection('posts').count() But, I got a warning: DeprecationWarning: …

mongodb node-mongodb-native
mongodb nodejs each vs toArray

I've had a quick look around and not found anything that's satisfied me with an answer but basically I've started …

node.js express node-mongodb-native