sequelize / sequelize/sequelize

Support `minifyAliases` option in `findAll`/`findOne`/`findAndCountAll`

Open
#15,361 4 comments 2 reactions 1 assignee View on GitHub

@frostzt is already working on this.

Since Dec 5, 2022.

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

Description

Issue Creation Checklist

  • I understand that my issue will be automatically closed if I don't fill in the requested information
  • I have read the contribution guidelines

Feature Description

Describe the feature you'd like to see implemented

Being able to enable minifyAliases on a single query instead of having to enable it globally.

Describe why you would like this feature to be added to Sequelize

The global minifyAliases option changes all queries. Enabling it at any point after the very beginning of the project risks breaking existing queries (especially if they use literal()). minifyAliases also make using literal() more difficult, to borderline impossible.

By supporting this option locally instead of globally (global can remain too ofc), only queries that really need the alias minification (because their identifiers are longer than the maximum length) are impacted.

Is this feature dialect-specific?
  • No. This feature is relevant to Sequelize as a whole.
  • Yes. This feature only applies to the following dialect(s):
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 will need guidance.
  • No, I don't have the time, but my company or I are supporting Sequelize through donations on OpenCollective.
  • No, I don't have the time, and I understand that I will need to wait until someone from the community or maintainers is interested in implementing my feature.

Indicate your interest in the addition of this feature by adding the 👍 reaction. Comments such as "+1" will be removed.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.