Skip to content

fullstack-hcm/mongo-init-0106

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CREATE

use [database] // tự tạo mới nếu chưa tồn tại

db.[name_collection].insertOne({}) // hàm tạo mới 1 docs[record]
db.[name_collection].insertMany([{}, {}]) // tạo mới nhiều docs

UPDATE

db.[name_collection].updateOne(<filter>, { $set: <update> }, <options>)
db.[name_collection].update(<filter>, <update>, <option>)
db.[name_colleciton].updateMany(<filter>, { $set: <update> }, <options>)

DELETE

db.[name_collection].deleteOne(<filter>, <options>);
db.[name_collection].deleteMany(<filter>, <options>);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published