---
title: "Comment by Narayana M V L on \"CRUD Operations using Node JS.\" | Hashnode"
description: "Nice Explanation Adhi, Just want to Add support for custom where clauses: async destroy(data, whereClause = {}) { const response = await this.model.destroy({ wh"
url: "https://hashnode.com/posts/crud-operations-using-node-js/6578475067bb0cc3a586c8a9/comment/6579475fa7af0fb6a9071cae"
---

[Discussion](https://hashnode.com/posts/crud-operations-using-node-js/6578475067bb0cc3a586c8a9)

Comment [CRUD Operations using Node JS.](https://hashnode.com/posts/crud-operations-using-node-js/6578475067bb0cc3a586c8a9)

[Narayana M V L](https://hashnode.com/@narayana85)

[Dec 13, 2023](https://hashnode.com/posts/crud-operations-using-node-js/6578475067bb0cc3a586c8a9/comment/6579475fa7af0fb6a9071cae)

Nice Explanation Adhi, Just want to Add support for custom where clauses:

async destroy(data, whereClause = {}) { const response = await this.model.destroy({ where: { id: data, ...whereClause, }, }); if (!response) { throw new AppError('Not able to find the resource', StatusCodes.NOT\_FOUND); } return response; }

This allows users to specify additional conditions for deletion besides the primary key.

[Abhishek Kumar](https://hashnode.com/@Abhishek30)

[Dec 13, 2023](https://hashnode.com/posts/crud-operations-using-node-js/6578475067bb0cc3a586c8a9/comment/6579475fa7af0fb6a9071cae#reply-657964d88c20139b60a71acf)

++
