public enum EResolverType extends Enum<EResolverType>
The resolver is responsible for linking column references to their source tables and performing semantic analysis after parsing.
TGSqlParser parser = new TGSqlParser(EDbVendor.dbvoracle); parser.setResolverType(EResolverType.RESOLVER2); // Use new resolver parser.sqltext = "SELECT * FROM employees"; parser.parse(); // Access resolver2 results TSQLResolver2 resolver = parser.getResolver2();
Instance-level setting (setResolverType) takes precedence over global TBaseType settings. When set to DEFAULT, the behavior is determined by TBaseType.isEnableResolver() and TBaseType.isEnableResolver2().
| Enum Constant and Description |
|---|
DEFAULT
Use global TBaseType settings to determine which resolver to use.
|
NONE
Disable name resolution entirely.
|
RESOLVER
Use the original TSQLResolver for name resolution.
|
RESOLVER2
Use the new TSQLResolver2 for name resolution.
|
| Modifier and Type | Method and Description |
|---|---|
static EResolverType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EResolverType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EResolverType DEFAULT
Resolution order:
public static final EResolverType RESOLVER
public static final EResolverType RESOLVER2
TSQLResolver2 provides improved column-to-table resolution with:
After parsing, access the resolver via TGSqlParser.getResolver2().
public static final EResolverType NONE
Use this when you only need the AST structure and don't need column-to-table relationships resolved.
public static EResolverType[] values()
for (EResolverType c : EResolverType.values()) System.out.println(c);
public static EResolverType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null