001package gudusoft.gsqlparser.sqlenv; 002 003import gudusoft.gsqlparser.EDbVendor; 004 005/** 006 * Utility to compute canonical identifier representations based on vendor rules. 007 * 008 * <p>{@link #canonicalize} returns the stored/display form 009 * ({@link IdentifierService#normalizeStatic}). It is NOT an equality primitive: to test 010 * whether two names refer to the same object use 011 * {@link gudusoft.gsqlparser.util.SQLUtil#sameName(EDbVendor, ESQLDataObjectType, String, 012 * String)} (single segment) or 013 * {@link gudusoft.gsqlparser.util.SQLUtil#compareIdentifier(EDbVendor, ESQLDataObjectType, 014 * String, String)} (qualified) — never canonicalize-then-compare. 015 */ 016public final class NameNormalizer { 017 018 private NameNormalizer() {} 019 020 public static String canonicalize(EDbVendor vendor, ESQLDataObjectType type, String identifier) { 021 return IdentifierService.normalizeStatic(vendor, type, identifier); 022 } 023} 024 025