Category "mongodb"

How do I call useQuery in a map function?

I have the below react component which is removing products from a mongodb collection based on the items in the cart. I get this error when I run the code: Comp

2 x criteria for Match showing no results

I am trying to show results where the sum of records is greater or equal to 4 and the status matches a string. If I leave off the status field it works fine but

Return an array element of an aggregation in an MongoDB Atlas (4.2) trigger function

So I am currently testing with returning an array element of a an aggregation in an MongoDB Atlas (4.2) trigger function: exports = function(changeEvent) {

I want to upload a large file to MongoDB using jQuery

I need help to upload large zip file (compressed) and save it to my MongoDB: <form action="./uploid" method="post" id="uploadForm" enctype="multipart

mongodb - combining multiple collections, but each individual query might not need all columns

Here is the scenario : We have 2 tables (issues, anomalies) in BigQuery, which we plan to combine into a single document in MongoDB, since the 2 collections (is

How to get less than or greater than value based on specific column in mongodb using node js?

Suppose that,I have a product collection named productCollection.How can i get all those products where the product's amount is less than a specific amount?What

How to maintain Audit Logs

I am storing user data in MongoDB and want to maintain activity logs for each user. eg: Who logged in and when? Which user perform certain and when they did Al

How to add key value pair in array of Mongoose response in JavaScript

I tried to do basic things. I have an array that contains multiple objects. I want to add new key-value pair in every array object. I tried this by following co

how to create mongodb composite schema in prisma using python?

File "/Users/akaash/opt/miniconda3/lib/python3.8/site-packages/prisma/generato r/models.py", line 861, in check_supported_scalar_list_type Cannot use b_boxes as

Extend golang struct/type from another package

I have done some reading and found similar threads but none seem to work for my use case. I am trying to extend mongo's primitive library specifically primitive

Records updated in Compass keep reverting

I have a MongoDB instance hosted on AWS DocumentDB. There is only one node in the replica set, and this is MongoDB 4.0.0 Community edition. Twice now I've upda

MongoDB in C# - Type not null query

I have collection where each document has two fields: "Field1" - string value "Field2" - object value with "Field2.Field3(object).Field4(string)". Now I'm tryin

How to have an active flag in NoSQL without transaction

This question is only for understanding purpose. This might be a noob question. Assume that I have a tabular or document NoSQL database which do not support tra

using $match + $sum condition in mongo Aggregation

I have an application running on graphql that queries some data in mongodb. Within the resolver we have some filtering conditions using where : export default {

Transform the mongoDB data into multiple collections and restore to new server

Problem: want to replicate mongodb data across servers but also like to alter a few attributes before to restoring. Server 1 (DB) -> Transform data of collec

How to have a sequence status in NoSQL without transaction

This question is only for understanding purpose. This might be a noob question. Assume that I have a tabular or document NoSQL database which do not support tra

How to have a sequence status in NoSQL without transaction

This question is only for understanding purpose. This might be a noob question. Assume that I have a tabular or document NoSQL database which do not support tra

How to filter data in collection containing documents with 3 level nested arrays depending on the values in the first and last nested array mongo

I appreciate any help in such case. Collection in MongoDB (now only 4 documents for demonstration purpose): { "_id" : ObjectId("62684847e9594c65cbaa5d85

C# MongoDB Guid Array

I have a document that is represented using this class public class UnitDocument { [BsonConstructor] public UnitDocument(Guid id, string allocId, Guid[]

MongoDb can't use types in jest - declares ... locally, but it is not exported

I use the mongodb library in TypeScript for a few functions (e.g. lambda functions but that should not matter). The imports look like that: import { ObjectId, D