sequelize / sequelize/sequelize
instance.destroy(...) does not return any information if rows has been deleted or not
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 30.4k
- Forks
- 4.3k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 68
Description
using Sequelize 3.3.2
var user = User.build({ id: 1 }, { isNewRecord: false })
user.destroy()
.then(function(){
console.log(arguments)
})
Code above always prints { '0': [] } no matter if row has been deleted or not. I am not sure if this is intentional, but it would useful to know that... Also returning option could be very useful (postgres) as I've mentioned in #4122
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the instance.destroy() entry point shown in the reproduction and compare behavior when the row exists versus when it has already been deleted. Review the related returning discussion in #4122, then define completion as exposing distinguishable deletion information and clarify whether PostgreSQL returning support is part of this issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, sql
- Domain
- backend, database
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100