$deleteMany
Delete multiple records from the table based on the provided conditions. The $deleteMany method is used to remove multiple entries in a single operation. If soft delete is enabled, the records are marked as deleted without being permanently removed; otherwise, they are permanently deleted. This method is ideal for batch deletion operations.
Query
Parameter's
$where
<StaticProps>
$options
⇒ <FindOptions>
await Member.$deleteMany({
$where: {
isPremium: false
},
$options: {
$force: false,
$limit: 5,
$truncate: true
}
});
Last updated