menu

Recent questions tagged mongodb

1 vote
1 answer
How do I get all the users into Mongo? I have a Python discord bot, I connected it to MongoBD, but I have a question: how to get all servers and all users in the database? ...
by TheMurkovich2
asked Sep 24, 2021
1 vote
1 answer
Error when searching for products, how to fix it? The form looks like this (pug): form.header__block-search-content(action="/shop/" method="GET") span.header-search-word Поиск input.header-search.header-sea ...
by aleshaykovlev
asked Sep 24, 2021
1 vote
1 answer
Which GuidRepresentation should I write? I use guids in my queries and everything works. But when you build it, you get vornings 'BsonValue.implicit operator BsonValue(Guid)' is obsolete: 'Use the BsonBinaryDa ...
by MykolaPetiukh
asked Sep 21, 2021
0 votes
2 answers
Can MongoDB be used instead of MySql for normal tasks? Well, for example for a blog site or forum, can MongoDB be used without MySql? In MongoDB there are indexes on separate JSON fields like in MySql on columns? So MongoD ...
by Lexxtor
asked Sep 20, 2021
1 vote
1 answer
How do I compare the two values from pymongo? Here is a piece of code: elif rolecoll.find_one({"_idRole": role.id})"cost" > collection.find_one({"_id": member.id})"cash": This comparison method does not work ...
by delam0re
asked Sep 19, 2021
1 vote
1 answer
How to link data in MySQL and MongoDB? Hi all. A question of a theoretical nature. Chat uses mongodb And there is a system where the user is registered, + to all this system must periodically analyze the ...
by IgorPI
asked Sep 19, 2021
1 vote
2 answers
Document-oriented or relational database (for my task)? I need to develop a server cabinet configurator. The choice of dimensions, material, ..., corresponding to the size of the door, shelf, etc. each entity, may have fixt ...
1 vote
1 answer
How to optimize frequent write requests to mongodb? Hello all. The site has a collection of minimal analytics - page views. At each page request js sends a request to api, where in collection mongodb puts record like: { ...
by maks15m
asked Sep 19, 2021
1 vote
1 answer
How to get values into a variable from MongoDB? I know how to get one value: for x in collection.find_one({"_id": "значение"}): y = x"..." And how do I get if the "test" field has, say, two values? ("test": 0, ...
by danys_kun
asked Sep 18, 2021
1 vote
1 answer
How do I import a database into mongodb? There is a folder withjon and bson files. How do I import it into MongoDB? ...
by kathleen1982
asked Sep 18, 2021
1 vote
1 answer
image
How to start Mongodb through the console? How to start Mongodb through the console ? ...
by Hiroshima
asked Sep 18, 2021
1 vote
1 answer
How can I use mongoose to filter out null values in an array nested in a table? There is a table with fields id, name, company, participants, where participants is an array of id, where there are values null. How to filter them? ...
by kathleen1982
asked Sep 16, 2021
1 vote
1 answer
How do I get last week's entries in mongo with one specific parameter? In MongoDB, the users_messages collection contains users' forum posts, 1 record per post. The fields of each record are timestamp, username, is_moderated, message. How t ...
by IoChto
asked Sep 15, 2021
1 vote
1 answer
How do I check if a certain document is in PyMongo? Is there any way to check a certain document in PyMongo? I tried like this: @client.command(name='bio')async def bio(ctx): if collection.find_one(ctx.author.id)"bio" ...
by TheMurkovich
asked Apr 4, 2021
2 votes
1 answer
How do I validate mongodb data? Hello. I use the native mongodb driver. I know that mongoose has a built-in security validator, but the native driver does not (please correct me if I'm wrong). Can yo ...
by IwanQ
asked Apr 2, 2021
1 vote
1 answer
image
How do I prevent duplication in an array? Is there any way to prevent adding the same id's to the array? I added { unique: true, dropDups: true }, but it doesn't help. Maybe I'm passing this option wrong. Can yo ...
by Zhanna_K
asked Apr 1, 2021
1 vote
1 answer
How do I make a two-level aggregation in a query? Good afternoon! There are now three collections with this format: let item = { _id: "...",}let itemGroup = { _id: "..."}let relation = { item_id: "...", grou ...
by filnor
asked Apr 1, 2021
1 vote
1 answer
Mongo DB. How to correctly build a query in this case? Hi all. I have recently started to learn mongodb, but I do not understand how to build a query in this case. The following data are available. { "_id" : "DBtxpeHsdh ...
by TechNOIR
asked Mar 29, 2021
1 vote
1 answer
How do I delete an object from mongodb? How do I remove the list with id 4? let services = { "1" : { "list" : { "4" : { "id" : 4, "desc" : ...
by Hanry654
asked Mar 26, 2021