pgbelt icon indicating copy to clipboard operation
pgbelt copied to clipboard

feat: Adding a new Filter model for tables and sequences

Open eldabaa opened this issue 9 months ago • 2 comments

Closes https://github.com/Autodesk/pgbelt/issues/598

Summary of Changes:

  • New Model: Introduced a new model to handle filtering.
  • Configuration Update: The configuration now includes a FilterConfig type for tables and sequences.
  • Filtering Logic: The apply method is responsible for filtering the results.

Filtering Approach:

  • When to Filter: I propose applying the filtering in the get_config_async method. By doing this, we centralize the function responsible for generating the necessary list of tables and sequences.

Benefits:

  • No need to adjust the current tool logic, as tables and sequences will be rendered as usual.
  • Potentially eliminates redundant code, as there will be no need to apply the filter again elsewhere in the tool.
  • Allows for user alerts if no tables are selected after filtering, before initiating all PG pools and other operations.

eldabaa avatar Feb 26 '25 13:02 eldabaa

Thank you for your submission, we really appreciate it. We ask that you sign our Contributor License Agreement before we can accept your contribution.

If you are contributing on behalf of your employer you must fill out our Corporate Contributor License Agreement which can be found here. If you are contributing on behalf of yourself you must agree to our Individual Contributor License Agreement by reviewing this document and signing it or by replying below a with a comment containing the following text:


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

github-actions[bot] avatar Feb 26 '25 13:02 github-actions[bot]

Chorus detected one or more security issues with this pull request. See the Checks tab for more details.

As a reminder, please follow the secure code review process as part of the Secure Coding Non-Negotiable requirement.

autodesk-chorus[bot] avatar Feb 26 '25 13:02 autodesk-chorus[bot]