Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(entity-generator): extend filtering options for EntityGenerator #5473

Merged

Conversation

patrykbojczuk
Copy link
Contributor

This adds the takeTables option to EntityGenerator's GenerateOptions and support for matching table and column names using regex.

This allows to generate entity models only for tables specified in the takeTables as well as use an array of strings and RegExps in the takeTables, skipTables and skipColumns.

Resolves #5469

Copy link

codecov bot commented Apr 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.74%. Comparing base (b922a73) to head (d2dc868).
Report is 2 commits behind head on master.

❗ Current head d2dc868 differs from pull request most recent head 4d7211c. Consider uploading reports for the commit 4d7211c to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #5473    +/-   ##
========================================
  Coverage   99.74%   99.74%            
========================================
  Files         260      261     +1     
  Lines       17903    17912     +9     
  Branches     4343     3798   -545     
========================================
+ Hits        17858    17867     +9     
  Misses         45       45            

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@patrykbojczuk patrykbojczuk marked this pull request as ready for review April 18, 2024 14:39
Copy link
Member

@B4nan B4nan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, just a few nits

packages/core/src/typings.ts Outdated Show resolved Hide resolved
packages/core/src/utils/match-name.ts Outdated Show resolved Hide resolved
@B4nan B4nan merged commit 0894ac9 into mikro-orm:master Apr 19, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: extended filtering options for EntityGenerator
2 participants