Interface INameMatcher
- All Known Implementing Classes:
DefaultNameMatcher,VendorNameMatcher
public interface INameMatcher
Interface for matching names (tables, columns) with various rules.
Handles case sensitivity, database-specific matching rules, etc.
Different databases have different name matching rules:
- MySQL: case-insensitive on Windows, case-sensitive on Unix
- PostgreSQL: case-sensitive for quoted identifiers
- Oracle: case-insensitive, converts to uppercase
- SQL Server: depends on collation
-
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if the matcher is case-sensitivebooleanCheck if two names match according to the matching rules.booleanmatchesPattern(String name, String pattern) Check if a name is a valid match for a pattern.Normalize a name according to matching rules.
-
Method Details
-
matches
Check if two names match according to the matching rules.- Parameters:
name1- First namename2- Second name- Returns:
- true if names match
-
matchesPattern
Check if a name is a valid match for a pattern. Used for prefix matching, wildcard matching, etc.- Parameters:
name- The name to testpattern- The pattern to match against- Returns:
- true if name matches pattern
-
normalize
Normalize a name according to matching rules. E.g., convert to uppercase for Oracle, lowercase for PostgreSQL unquoted.- Parameters:
name- Name to normalize- Returns:
- Normalized name
-
isCaseSensitive
boolean isCaseSensitive()Check if the matcher is case-sensitive
-