db-local
  • Introduction
  • Getting Started
  • Schema
  • Methods
    • .find()
      • References
      • Filters
    • .create()
    • .update()
    • .remove()
Powered by GitBook
On this page

Was this helpful?

  1. Methods

.remove()

Remove a document

Previous.update()

Last updated 3 years ago

Was this helpful?

Parameter

Description

_id

​ |

The id of the document that will be removed

User.remove({ _id: 1 }) // true

Or remove a user from find:

const userFound = User.find({ _id: 1 })
userFound.remove() // true

String
Number​