Category "mongodb"

In mongoose I have executed the example program given in the website but I'm getting the same error that is: TypeError: fluffy.speak is not a function

const mongoose = require('mongoose'); main().catch(err => console.log(err)); async function main() { await mongoose.connect('mongodb://localhost:27017/t

MongoDB python connection

I just upgraded my mongoDB subscription and suddenly I get this error everytime I try to connect: -shard-00-02.dlu0y.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY

Index on oplog.rs

Is there any impact creating an index on oplog.rs on the following fields {"ns": 1, "op": 1, "ts": 1} to improve the query on those fields that causing a lot of

Error: Cannot init client | mongo-connect express-session

I am getting error while trying to save session on mongodb. Here is my code.. const express = require("express"); const session = require("express-session"); co

How can we report to our customers that the orders are closed in our react native app?

I am making a react native app to deliver homemade snacks by taking orders the previous day. Whenever I am not available, how can I notify my customers that I c

Why MongoDB saves Hash value in different format?

I am learning IPFS and trying to save IPFS file info in MongoDB. After uploading, I get one hash value ex: {fileHash: CID(QmbCaWPi9tSqcnykvBUMaH2M1d5PiVPLEfPwhJ

Node js SyntaxError: Unexpected token 'export'

I'm having the following error in the console when I try to run my api written in node js. Can you tell me which is the problem.

com.mongodb.MongoSocketOpenException: Exception opening socket with spring boot and mongodb cloud

Please suggest any solution for the below exception which is occuring while running my rest api while executing springboot application with mongodb cloud db. I

Does the return value of a MongoDB Atlas trigger function have meaning?

In MongoDB Atlas, you can create triggers. These allow javascript functions, with access to the Mongo database, to respond to events. (See the docs at https://w

MongoNotConnectedError: MongoClient must be connected to perform this operation. How to handle this error?

cmd How can i solve this. Just showing MongoClient must be connected to perform this operation at getTopology ..... at collection.insertOne .... at maybePro

Error while 'composer require jenssegers/mongodb' adding MongoDB to new Laravel 7 Project

After fresh installation of laravel 7 project, C:\xampp\htdocs\blog>composer require jenssegers/mongodb --ignore-platform-reqs But this is giving an error

Why the data resets after save in database?

I'm trying to save new phone number in database First by another method get phone number and temporary save it and send a code to user then by following methods

How to map with the help of Automapper (TypeScript) the entries of an array filled with different DTOs?

I'm using the TypeScript library "Automapper" in my NestJS backend to convert an answer of MongoDb/Mongoose to an DTO. That's how the answer looks like: { "

I can't call PATCH method using Pug, Mongoose and Express.js

I am new to code and I apologize in advance for all my noob mistakes. I'm trying to set a new color to an existing object stored in MongoDB using the PATCH meth

How to query mongoDB with mongoose without having a model

so i want to query my mongo DB without using a model, let me preface this by saying, i am looking for options other than using the mongodb driver. so in one app

MongooseError: Operation 'featureds.find()` buffering timed out after 10000ms

I have a collection on MongoDB from which I'm trying to query all the elements using find(): const mongoose = require('mongoose'); const Featured = mongoose.mod

Pandas dataframe to mongoDB document

I have a pandas dataframe that I import to a MongoDB database. Each row of the dataframe is transformed into a document like bellow. { title: 'Spaci

Test Suite Failed to run

Error thrown: "Exceeded timeout of 5000 ms for a hook. Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test." 24 | &

Unwind object array but preserve its parent

I want to unwind some data, but preserve the parent. I am getting the whole flattened objects, but missing the first one. I want to keep that one. How can I do

post api pblm in backend

const newItem = { name, price, img, detail, email } fetch("http://localhost:5000/add", { method: "POST", header: { "content