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: extended filtering options for EntityGenerator #5469

Closed
patrykbojczuk opened this issue Apr 17, 2024 · 1 comment · Fixed by #5473
Closed

feat: extended filtering options for EntityGenerator #5469

patrykbojczuk opened this issue Apr 17, 2024 · 1 comment · Fixed by #5473
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@patrykbojczuk
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I have to create entity models for small subset of tables.
Currently I'd have to use skipTables with very long array of table names to get only the entities I need.
Also some of those table have constant prefix which can be matched with the pattern.

Describe the solution you'd like
I'd like to have another option takeTables to specify tables to generate entities for.
I'd also like to have the ability to specify RegExp to match table names to take/skip.

Describe alternatives you've considered
Getting list of all tables, filtering them out and using in skipTables.

Additional context
I could implement this feature.

@patrykbojczuk patrykbojczuk added the enhancement New feature or request label Apr 17, 2024
@B4nan
Copy link
Member

B4nan commented Apr 17, 2024

Sure, PR welcome.

@B4nan B4nan added help wanted Extra attention is needed good first issue Good for newcomers labels Apr 17, 2024
B4nan added a commit that referenced this issue Apr 19, 2024
…5473)

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 `string`s and `RegExp`s in the
`takeTables`, `skipTables` and `skipColumns`.


Closes #5469

---------

Co-authored-by: Martin Adámek <banan23@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants