It seems mongo does not allow insertion of keys with a dot (.) or dollar sign ($) however when I imported a JSON file that contained a dot in it using the mongoimport tool it worked fine. The driver is complaining about trying to insert that elemen...
I use Mongoose.js and cannot solve problem with 3 level hierarchy document.  There 2 ways to do it.  First - without refs.  C = new Schema({     'title': String, });  B = new Schema({     'title': String,     'c': [C] });  A =...
how do i add a value to the top of an array in mongodb?  say i have this document in my mongo collection:  { "colors" : [ "red", "green", "blue" ] }   how do i add "yellow" to the front of the list?  when i do:...
I want to reuse MongoDB connection. I 'am aware of How to reuse mongodb connection in node.js  I want to acheive the same using Promises and Mongo driver v2  Currently I have to connect to db for every request which makes it slow. This is my code...
I’m creating a NoSQL database using Firebase, but as I’m a SQL thinker my mind needs some advices about Firebase queries and NoSQL Data Structure.  I am making some experiments for a Mobile App using also Ionic 2 (AngularJS 2), and my concerns ar...
I have used mongodb database and node.js v12.0.10 for connecting and updating mongodb collection. connection code is the following:   async.parallel({         RE5: function (cb) {             MongoClient.connect(config.riskEngineDB, function (err, r5...
I have a Firebase database structuring question. My scenario is close to a chat application. Here are the specifics  - users(node storing several users of the app)   - id1       name: John   - id2       name: Meg   - id2       name: Kelly - messages(...
While exploring mongoose for nodejs I ran into the problem of needing to know the amount of user in my collection:   My collection has records, each record has a user. I want to know the amount of unique (different) users.  How can I do this with mon...
I know that there are 1,000 answers out there to this question, which is partially why I'm so confused by the fact that I can't get it to work.  I can't get the orderByChild query / filter to work. I've looked at at least 25 tutorials...
Supposedly I have a database structure like this   Person ('name', 'age') Belonging ('person', 'type')   with its relationship like this  Person -> Belongings (one to many)   and I want to query all person with thei...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.