Questions tagged as 'mongodb'

0
answers

Sort query output in mongoose (find) by two fields

I can not sort the result of a query in mongoose and I do not know if an aggregation function is necessary to achieve that order. I have a column called _id and another column called comment_id (which contains the main _id to reference). This...
asked by 29.08.2018 / 15:53
2
answers

Filter data of a collection by date

I need to filter the occurrences of the last hour of the next mongodb query; db.OPERATIONS.find({"Description":"Not playable."}).count() Thank you very much in advance. Greetings.     
asked by 23.10.2018 / 11:08
1
answer

Obtain users with points between 0-10, 11-20 ... MongoDB

I need to obtain from a database of mongo users whose points range from 0-10 , 11-20 , 21-30 ... so up to 100 points. The points field is of type string. The final idea is to get something similar to this: 0-10...
asked by 22.08.2018 / 13:55
0
answers

Subqueries in mongoose

I have a problem when making subqueries in mongoose, I have two collections one place and another material , the place collection has an array of materials ids added by a user . Now what I'm trying to do is to be able to update a plac...
asked by 16.08.2018 / 21:02
0
answers

Database in Mongodb, add information (Theft 3T)

I am working with mongodb, I have a collection of users, but it is empty, I want to add a user to the bd, I use Robo 3T, before I could do it quietly, I went Robo 3T, I connected, I went to the user collection and inserted a document, for exampl...
asked by 12.07.2018 / 13:43
0
answers

How to use variables with Apollo Graphql

I am using React, GraphQL, Apollo, MongoDB ... I have a list of clients on the screen and I have a search button that when clicking on it goes to a handleSubmit: handleSubmit = (ev, args)=>{ const response = this.props.allClientes({opt...
asked by 28.05.2018 / 18:33
1
answer

MEAN stack installation error

I am installing the MEAN Stack (MongoDB, Express, AngularJS, NodeJS) in ubuntu 16.04 when installing mongo I get the following error .. someone has solved this before? Annex screnshot Thanks in advance!     
asked by 21.05.2018 / 05:15
2
answers

Chaining of promises with mongodb querys

Good morning, I would like to know how to chain promises that have queries to the database (with a callback within the promise). On the internet I have found that a promise of javascript can be executed in the following way: function shareC...
asked by 16.05.2018 / 18:23
1
answer

Problems showing queries result in express + mongodb

Hi, I am trying to make an API that, given some ids, returns an array with each object found. The problem is that the app breaks when I consult the api as shown below. I would like someone to help me with what is happening as I am new with node....
asked by 04.05.2018 / 17:42
0
answers

Add values from different collections in MongoDB

I am trying to add the values of each document and in each collection. I explain myself better, I have 5 collections in MongoDB and in each collection I have more than 280,000 documents. Something like that. 1st Collection. "_id" : Obje...
asked by 23.04.2018 / 09:18