Skip to content Skip to sidebar Skip to footer
Showing posts with the label Mongodb

Check If Document Already Exists And If Yes Then Update, Otherwise Create New - Mongoose

I have app where I am trying to check whether a document with the users ID already exists, if yes t… Read more Check If Document Already Exists And If Yes Then Update, Otherwise Create New - Mongoose

Mongoose Seems To Fail Quietly

So have a completely separate issue (I think) which is saving an array to a mongo document. So I to… Read more Mongoose Seems To Fail Quietly

How Can I Update A Mongoose Subdocument In An Instance Method?

I have a Mongoose document with an array of subdocuments like this: var RegionSchema = new Schema({… Read more How Can I Update A Mongoose Subdocument In An Instance Method?

Accessing Mongodb's Object From Mapper (mapreduce)

I have an extra question based on the one I asked before: calculate frequency using mongodb aggrega… Read more Accessing Mongodb's Object From Mapper (mapreduce)

Mongodb Node-mongodb-native Map/reduce

I have a map/reduce method using node-mongodb-native. I'm trying to only return distinct recor… Read more Mongodb Node-mongodb-native Map/reduce

Query And Filter Key Names Instead Of Values In Mongodb

I want to find all key names from a collection that partially match a certain string. The closest I… Read more Query And Filter Key Names Instead Of Values In Mongodb

Meteor App Ran With Pm2 Fatal Error: Call_and_retry_last Allocation Failed - Javascript Heap Out Of Memory

I am using meteor. I build my app with meteor build. Then I try to run it with pm2 MONGO_URL=mongod… Read more Meteor App Ran With Pm2 Fatal Error: Call_and_retry_last Allocation Failed - Javascript Heap Out Of Memory

Limit = 1 = 1ms, Limit > 1 = 150ms (mongo-melt-down)

Using MongoDB Native Driver, here's the query: mo.post.find({_us:_us, utc:{$lte:utc}},{ f… Read more Limit = 1 = 1ms, Limit > 1 = 150ms (mongo-melt-down)

Advice Needed: How To Properly Connect React To Mongodb

I have been investing some time learning React, MongoDB, and other JS web app related tools. For a … Read more Advice Needed: How To Properly Connect React To Mongodb

How To Export An Object That Only Becomes Available In An Async Callback?

I have a db.js file in which I set up a MongoDB connection. I would like to export the database obj… Read more How To Export An Object That Only Becomes Available In An Async Callback?

How To Make A Mongodb Query Sort On Strings With -number Postfix?

I have a query: ownUnnamedPages = Entries.find( { author : this.userId, title : {$regex: /^unnamed-… Read more How To Make A Mongodb Query Sort On Strings With -number Postfix?

Update Object With Given Id Embed In Array Without Restructuring Mongo Database

I've got the following document named 'clients' which includes id, name and list of pro… Read more Update Object With Given Id Embed In Array Without Restructuring Mongo Database

My $push Method In Mongoose Does Not Work Ok

I have a problem understanding why $push creates only one element in nested array and shows only th… Read more My $push Method In Mongoose Does Not Work Ok

Update Two Layer Nested Object Based On The Id

I have this structure in my Mother Model (this is a fixed structure and I just push cards or update… Read more Update Two Layer Nested Object Based On The Id

Mongoose: Findoneandupdate Does Not Update An Existing Field

I am trying to fetch every minute a web API data to MongoDB, save it and update when there is any c… Read more Mongoose: Findoneandupdate Does Not Update An Existing Field

Bootstrap's Pagination In Reactjs - Data Coming From Mongodb

Am trying to make a pagination in reactjs application. Please find the code below. Finally am not a… Read more Bootstrap's Pagination In Reactjs - Data Coming From Mongodb

Mongodb Get Entire Document From A Value

i want to get all values of a mongodb document from a single value. Example: 'id': '… Read more Mongodb Get Entire Document From A Value

Using Positional Operator For Multiple Levels Of Subdocuments

I am using sub-documents in mongodb. With one level of sub-documents, I can update documents with P… Read more Using Positional Operator For Multiple Levels Of Subdocuments

Calling Db.system.js Function In $where

As a basic example, I have this function saved: db.system.js.save({_id: 'sum', value: funct… Read more Calling Db.system.js Function In $where

Meteor/mongodb See Available Fields For Publish?

How can I see what fields are in the users collection that are available for me to publish from the… Read more Meteor/mongodb See Available Fields For Publish?