Class DefaultNameMatcher

Object
gudusoft.gsqlparser.resolver2.matcher.DefaultNameMatcher
All Implemented Interfaces:
INameMatcher

public class DefaultNameMatcher extends Object implements INameMatcher
Default implementation of INameMatcher. Uses case-insensitive matching (common default for most databases).
  • Constructor Details

  • Method Details

    • matches

      public boolean matches(String name1, String name2)
      Description copied from interface: INameMatcher
      Check if two names match according to the matching rules.
      Specified by:
      matches in interface INameMatcher
      Parameters:
      name1 - First name
      name2 - Second name
      Returns:
      true if names match
    • matchesPattern

      public boolean matchesPattern(String name, String pattern)
      Description copied from interface: INameMatcher
      Check if a name is a valid match for a pattern. Used for prefix matching, wildcard matching, etc.
      Specified by:
      matchesPattern in interface INameMatcher
      Parameters:
      name - The name to test
      pattern - The pattern to match against
      Returns:
      true if name matches pattern
    • normalize

      public String normalize(String name)
      Description copied from interface: INameMatcher
      Normalize a name according to matching rules. E.g., convert to uppercase for Oracle, lowercase for PostgreSQL unquoted.
      Specified by:
      normalize in interface INameMatcher
      Parameters:
      name - Name to normalize
      Returns:
      Normalized name
    • isCaseSensitive

      public boolean isCaseSensitive()
      Description copied from interface: INameMatcher
      Check if the matcher is case-sensitive
      Specified by:
      isCaseSensitive in interface INameMatcher
    • toString

      public String toString()
      Overrides:
      toString in class Object