node-mongodb-native Questions
0
I'm using a nodejs client to loop over input and create an array of values that will be handed off to the bulkWrite operation:
var updateVal = { sku: item.sku, name: item.name, updatedAt: new Date...
Helsell asked 18/5, 2016 at 16:59
1
I have a NodeJS application (using the node-mongodb-native driver version 2.1) which does the following:
Opens a connection to MongoDB.
Queries a collection (batchSize is set to 1000). This query...
Coypu asked 11/5, 2016 at 14:43
0
We have multiple collections of about 10,000 documents (this will become increasingly more in the future) that are generated in node.js, and need to be stored/queried/filtered/projected multiple ti...
Dirndl asked 12/4, 2016 at 20:27
1
Solved
This has me stumped.
I have a standalone (command-line executed) node script, whose purpose is to iterate through all the documents in a large collection (several hundred thousand of them), and fo...
Nicolais asked 4/4, 2016 at 16:8
1
Solved
I'm trying to check if the user with the email provided exists in the collection users, but my function keeps returning undefined for every call. I use es6 and async/await in order to get rid of lo...
Otocyst asked 31/10, 2015 at 10:52
2
I have a database with the following document structure:
{
"_id" : ObjectId("520bea012ab230549e749cff"),
"Day" : 1,
"Time" : 54,
"State" : "Vermont",
"Airport" : "BTV",
"Temperature" : 39,
...
Edelmiraedelson asked 14/8, 2015 at 17:34
1
I'm facing a problem while creating Mongoose schema for my DB. I want to create a map with a objectId as key and an array of string values as its value. The closest that I can get is:
var schema =...
Pelpel asked 16/8, 2015 at 18:39
1
Solved
I have an express app, storing data in mongo, using Jade as the view engine. I have a simple route that gets the docs in a particular collection, each doc corresponding to a product. The image is b...
Interrupter asked 6/7, 2015 at 11:51
1
Solved
I'm trying to achieve a "getOrCreate" behavior using "findAndModify".
I'm working in nodejs using the native driver.
I have:
var matches = db.collection("matches");
matches.findAndModify({
//que...
Ceremonious asked 7/7, 2015 at 0:15
2
Solved
So. I have a very basic script, that connects to a database and does a find on a collection that has a lot of documents and limit it to 3 items. Everything runs smoothly except that at the end of m...
Tetherball asked 30/8, 2012 at 21:6
2
Solved
How can I get collection names without database name from mongodb native driver for nodeJS?
db.collectionNames(function(err, collections) {
if (err) {
log.error(err);
} else {
log.info(collect...
Nordau asked 17/5, 2014 at 6:45
1
Solved
I've just installed Mongo, Node, etc. and when I try to update the database via my nodejs server, I get this error:
MongoError: driver is incompatible with this server version
Here are the versi...
Sanctum asked 20/5, 2015 at 23:55
1
Solved
I want to query a collection in my replica set using the native 2.0 mongodb driver for node. I can connect and authenticated against the admin database but how do I switch databases to query the co...
Geomorphology asked 8/5, 2015 at 10:5
1
Solved
I am currently using MongoDB cursor's toArray() function to convert the database results into an array:
run = true;
count = 0;
var start = process.hrtime();
db.collection.find({}, {limit: 2000}).t...
Coacher asked 16/4, 2015 at 12:43
1
Solved
I'm using Node.js and Angular.js for a web project. I understand that date is saved as date if it's created on server using new Date() (e.g. 2015-04-08 04:15:18.712Z shown in Robomongo as Date type...
Thirtieth asked 8/4, 2015 at 4:30
1
Solved
I'm using Node.js v0.12.0 with MongoDB driver v1.4.34. So, is there any difference between converting ObjectID to String with toString and toHexString methods?
Stenophyllous asked 13/3, 2015 at 11:5
1
I'm implementing a nodejs server which is using mongodb as database and mongodb-native library to connect it.
Further, I'm using clustering to enhance the server performances. So there are two pos...
Richellericher asked 6/5, 2014 at 8:7
0
I'm wondering what the most efficient way to manually abort a running query with the official node client is. In my current code I am creating a new DB connection for each remote client and then si...
Howlond asked 8/9, 2014 at 23:51
3
Solved
I am using mongodb-native-driver in express.js app. I have around 6 collections in the database, so I have created 6 js files with each having a collection as a javascript object (e.g function coll...
Leveridge asked 4/8, 2013 at 14:39
1
Solved
Right now, the parent for-loop (m < repliesIDsArray.length) completes before the first findOne fires, so this all only loops through the last element of the repliesIDsArray..asynchronous..
What...
Torrlow asked 3/8, 2014 at 23:42
1
Solved
I am working through a MEAN stack tutorial. It contains the following code as a route in index.js. The name of my Mongo collection is brandcollection.
/* GET Brand Complaints page. */
router.g...
Mccahill asked 3/8, 2014 at 18:42
2
Solved
I'd like to use full text search available in MongoDB 2.4.
Text search is available through runCommand function e.g. db.collection.runCommand( "text", { search: "keywords"}). So, I'm wondering whe...
Uraeus asked 8/6, 2013 at 18:46
3
Solved
When my MongoDB connection is idle for a few minutes, the next request ends in error. From the mongo command line client, it looks like this:
> db.users.find()
Sat Jan 12 23:42:35 Socket recv()...
Farflung asked 13/1, 2013 at 8:5
3
Solved
I am experiencing a very strange problem. I am importing some big xml-files and store them into mongoDB. The algorythm is a typical async loop:
doLoop = function( it, callback_loop ) {
if( it <...
Attune asked 11/7, 2013 at 8:10
1
i have a collection that is storing data in this format :
{
_id: ObjectId("51b9be6dbbdeef1e5f008cca"),
name: 'sfdsfsdfsdfsdfsd'
details: {
varA: {
created: "2013-06-13T12:43:25.853Z",
validi...
Skimpy asked 13/6, 2013 at 13:55
© 2022 - 2024 — McMap. All rights reserved.