Class DefaultNameMatcher
Object
gudusoft.gsqlparser.resolver2.matcher.DefaultNameMatcher
- All Implemented Interfaces:
INameMatcher
Default implementation of INameMatcher.
Uses case-insensitive matching (common default for most databases).
-
Constructor Summary
Constructors -
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.toString()
-
Constructor Details
-
DefaultNameMatcher
public DefaultNameMatcher() -
DefaultNameMatcher
-
-
Method Details
-
matches
Description copied from interface:INameMatcherCheck if two names match according to the matching rules.- Specified by:
matchesin interfaceINameMatcher- Parameters:
name1- First namename2- Second name- Returns:
- true if names match
-
matchesPattern
Description copied from interface:INameMatcherCheck if a name is a valid match for a pattern. Used for prefix matching, wildcard matching, etc.- Specified by:
matchesPatternin interfaceINameMatcher- Parameters:
name- The name to testpattern- The pattern to match against- Returns:
- true if name matches pattern
-
normalize
Description copied from interface:INameMatcherNormalize a name according to matching rules. E.g., convert to uppercase for Oracle, lowercase for PostgreSQL unquoted.- Specified by:
normalizein interfaceINameMatcher- Parameters:
name- Name to normalize- Returns:
- Normalized name
-
isCaseSensitive
Description copied from interface:INameMatcherCheck if the matcher is case-sensitive- Specified by:
isCaseSensitivein interfaceINameMatcher
-
toString
-