Category "mongodb"

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

Update indexes mongodb using Spring

Does someone know what Spring application properties need to be specified so that the index is overwritten (if already been created) with new parameters. For ex

Adding an image while using mongoose Schema

How can I add an image to my mongodb when using the mongoose.schema in JS? const chequeSchema = new schema({ chequeImageUri: { type: Image, req

MongoDB how to update an object property in nested array

I have the following structure in my MongoDb where I have a topic object inside of a topics array. Within the topic object, I have a messages array. What I am t

No environment variables with Next.js TypeScript Custom server

I am currently building a next.js app for a course at uni. I want to run a script when the development server starts that performs some API calls to update the

mongodb command very slow

I have 3 documents like this: { _id: ObjectId("..."), _details: { _session: ObjectId("example_1"), }, { _id: ObjectId("..."), _details: { _session: Obje

Aggregate Pipeline to exclude collections from db.watch() MongoDB

I am using MongoDB's changeStreams to watch for changes in my database. My database has 17 collections. I'd like to watch every collection for changes except fo

Update a value in a nested field?

user :["id": 1, userObj:[{"bookid": 1, "library":"Oxford", "taken":true}, {"bookid": 2, "library":"Cambridge", "taken":true}]] I would like to update the value

Using C# LINQ with MongoDB Find

I am only about 3 days into using MongoDb and C# driver so be gentle. ;-) I have a MongoDB query working with AsQueryable. I would like to use the collection.Fi