Delete()

delete(q?: {})

The delete method allows removing a document from a collection by its unique identifier _id. The deletion is permanent and the document will no longer exist in the collection. If q is defined in config.json, the backend may enforce additional conditions, such as ensuring a user can only delete their own records.

const result = await client.collection("todos").delete({ _id: "661d42f7b39a4b0012a67f12" })
Edit this page on Github
© 2025 kav3.com. Crafted with and dedication.