Create
insertOne(data, options)
To insert one record.
insertMany(data, options)
To insert multiple records at once.
Read
find(filter, options)
returns all data available after applying filterfindOne(filter, options)
returns the first occurrence after applying filterUpdate
updateOne(filter, data, options)
To find and update first record of the filter
updateMany(filter, data, options)
To find and update all records in the filter
replaceOne(filter, data, options)
very similar to updateOne
Delete
deleteOne(filter, options)
delete the first record in the filter
deleteMany(filter, options)
deletes all records in the filter
Comments
Post a Comment