| Method | Description |
insert(doc) / insertAsync | Insert one document |
insertMany(docs) / insertManyAsync | Insert multiple documents |
find(query?) | Start a query (returns QueryBuilder) |
findOne(query?) / findOneAsync | Find first matching document |
updateOne(filter, update) / updateOneAsync | Update first match |
updateMany(filter, update) / updateManyAsync | Update all matches |
deleteOne(filter) / deleteOneAsync | Delete first match |
deleteMany(filter) / deleteManyAsync | Delete all matches |
import(file, options?) / importAsync | Import documents |
startTransaction() | Begin a transaction |
aggregate(pipeline) | Run aggregation pipeline |
rebuildId() / rebuildIdAsync | Recalculate next auto ID |