Add glob wildcard support to NoData and Ignore table filters#1093
Merged
Conversation
Table entries in the dump configuration (nodata and ignore) can now contain glob wildcards like 'customer*' or 'order*'. Patterns are expanded against the actual table list of the database, matching case-insensitively. Entries without wildcards keep behaving as exact names. Fixes #1089 https://claude.ai/code/session_012P9LW5x7MB5vS3jaUB4m6c
Code Coverage OverviewLanguages: Go Go / code-coverage/go-testThe overall coverage in the branch remains at 54%, unchanged from the branch. Show a code coverage summary of the most impacted files.
Code Coverage is in Public Preview. Learn more and provide us with your feedback. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for glob wildcard patterns (e.g.,
customer*,*_archive,old_?) in theNoDataandIgnoretable filter lists for database dumps. This allows users to match multiple tables with a single pattern instead of listing each table individually.Key Changes
expandTablePattern()function: Expands glob patterns against the actual table list, supporting*,?, and[...]wildcards. Patterns without wildcards are returned verbatim to allow non-existent table names. Matching is case-insensitive.buildFilterMap()function: Builds the filter map by expanding all patterns inNoDataandIgnorelists.Ignorepatterns take precedence when both match a table.Dumper.Dump()method: Now usesbuildFilterMap()to process patterns instead of simple string mapping.ConfigDumpstruct and JSON schema to indicate wildcard support.Implementation Details
path.Match()for glob pattern matching (standard library)https://claude.ai/code/session_012P9LW5x7MB5vS3jaUB4m6c