I'm trying to add an "Instructors" array into an already existing "Camps" array.  The hierarchical structure looks something like this:   owner = {      email : '[email protected]',     password : 'mypassword',...
I would like to be able to query my mongoDB and display this result on my web page made with Node...right now I am using the mongojs driver - I've found the driver very very good for putting data into the DB - the syntax is the same as the Mongo...
Does anyone have a good approach for a query against a collection for documents that are older than 30 seconds. I'm creating a cleanup worker that marks items as failed after they have been in a specific state for more than 30 seconds.  Not that...
Presently being driven up the wall by this error.  I am running a node.js app with the mongojs wrapper for mongodb. I Started mongod on the default port, then ran  var db = require('mongojs').connect('localhost:27017/my_db'); var user...
I'm trying to store and retrieve a date in mongojs. Here's how it's saved:  var game = { startedOn: new Date() }; db.games.save(game);   When I fetch it, the date is not a date anymore. It's some kind of wrapper around a date.  The _d...
I have a lot of data to fetch from a mongodb database. I can't load all the data at once on the server because it's too big and I would run out of memory.  If I use forEach, will it fetch everything and load everything on the server then appl...
I was trying to use findOne method. But it didn't show anything.It looks like it didn't execute. Would you like to help me solve this problem?  var mongojs = require('mongojs');  var databaseUrl = "mongodb:local:27017/mydb"; v...
I have a simple method as follows to write to a mongodb database.  It uses the Mongojs module.  Everything seems fine with the exception of the last line.  I'm getting "TypeError: Cannot call method 'save' of undefined" in the con...
I have one mongojs query such as:     db.mapping.find(     { "provider":req.params.provider, "perId":mongojs.ObjectId(req.params.perId) },     function(err, que){         if(err)             res.send(err);         else if(que)...
I am working on a NodeJS express app using MongoDB (currently using Mongojs) and am not able to figure out how to do a certain thing with it.  I need to insert an object into a collection, and immediately get this new insert's unique identifier t...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.