In the 6.x.x version of MongoDB or MongoDB on the cloud, the 'update' operation is not supported. Instead, it supports the 'updateMany' operation for updating multiple data entries simultaneously.
if someone is watching this time ,note that ....change update to updateMany .............its change due to updatat in node...........no thanks......................hehehehe
new mongdb version use mongod comand instead of mongo and also we use mongosh for intercting with mongo db for this we will install mongo shell separate
sir i think we also need to close the connection after every updation //require from the index const {connectToDatabase,closed}= require('./0index'); async function update(){ //connectrodatabase returns a resolved promise till we need to wait try{ const db= await connectToDatabase(); const result = await db.collection('product').updateOne({name: "xxx"},{$set:{item:"yyyy"}}); console.log(result) console.log('Document inserted:', result.insertedId); } catch(error){ console.log(error); }finally{ closed() } } update();
you teach extremely well...........♥♥♥
Nice Video for clearing concepts of node
Sir you are great your teaching method is very good please complete the lecture series as soon as possible love from Pakistan
Did you completed?? It's been around 1 year!
excellent
Thanks for the wonderful explanation.
Thank U Sir for ur teachings
Please upload complete the lectureseries as soon as possible sir 🎈
As soon as possible
Love from Bangladesh
awesome tutorial
Thank you! Cheers!
Very nice video
Nice work 👍👍👍
Nice content ✌️
In the 6.x.x version of MongoDB or MongoDB on the cloud, the 'update' operation is not supported. Instead, it supports the 'updateMany' operation for updating multiple data entries simultaneously.
🙏
Nice video
well explained
Nice work
awesome
Thank you sir 🙂
Most welcome
if someone is watching this time ,note that ....change update to updateMany .............its change due to updatat in node...........no thanks......................hehehehe
This is a best video
Thanks a lot sir please add javascript also in the caption name
nicee
Anil sir yar in 2022
new mongdb version we can't use mongo db compass for backend data
i mean sir i have problem yar
new mongdb version use mongod comand instead of mongo and also we use mongosh for intercting with mongo db for this we will install mongo shell separate
nice
Very informative
Sir I have error during compilation the error is updateone is not defined can you please tell me how to. Resolve it
Here update() is not supported so which one I can use ??
Dear Sir aur kitni videos aye gi node series ma?
20-25 video
@@codestepbystep thank you so much for reply Sir💕
Express bi aayegi sir videos
@@Kash_24_24 yes
Great man
Sir how to update multiple rows with different different condition with we want to execute only one time update function?
done sir
every time insert.js code execute when i change in update.js and save that file, why its happen?
Sir what if want to update more than one at the same time.
OutStanding
in collection there are multiple matches, how can I update 2nd or 3rd match
Use I'd instead of name field.
How to update data using auto generated record ID?? Please help
👏🏻👏🏻
lecture 33 completed
sir i think we also need to close the connection after every updation
//require from the index
const {connectToDatabase,closed}= require('./0index');
async function update(){
//connectrodatabase returns a resolved promise till we need to wait
try{
const db= await connectToDatabase();
const result = await db.collection('product').updateOne({name: "xxx"},{$set:{item:"yyyy"}});
console.log(result)
console.log('Document inserted:', result.insertedId);
}
catch(error){
console.log(error);
}finally{
closed()
}
}
update();
😊