sequelize / sequelize/sequelize

Missing `bulkDelete` typings

Open
#14,635 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

typescript v6
Dominant language
TypeScript
Stars
30.4k
Forks
4.3k
Avg merge
1d 6h
Merged PRs (30d)
68

Description

Issue Creation Checklist

[x] I have read the contribution guidelines

Issue Description

According to the documentation, the queryBuilder.bulkDelete method accepts the boolean values truncate, cascade and restartIdentity in the options arguments. But this is not reflected in Typescript.

A BulkDeleteOptions interface extending QueryOptions with the parameters truncate, cascade and restartIdentity should be added.

A PR regarding this issue (#12750) was already submitted but it got closed by a bot.

Additional context

image

image

Issue Template Checklist

Is this issue dialect-specific?
  • No. This issue is relevant to Sequelize as a whole.
  • Yes. This issue only applies to the following dialect(s): XXX, YYY, ZZZ
  • I don't know.
Would you be willing to resolve this issue by submitting a Pull Request?
  • Yes, I have the time and I know how to start.
  • Yes, I have the time but I don't know how to start, I would need guidance.
  • No, I don't have the time, although I believe I could do it if I had the time...
  • No, I don't have the time and I wouldn't even know how to start.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the TypeScript declaration for queryBuilder.bulkDelete and compare it with the QueryOptions type and the documented bulkDelete API. Add the missing option typing for truncate, cascade, and restartIdentity, then verify that TypeScript accepts these options and that the existing type checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.