Class MsAbstractExprWithNmspc<T>
java.lang.Object
org.pgcodekeeper.core.parsers.antlr.ms.expr.MsAbstractExpr
org.pgcodekeeper.core.parsers.antlr.ms.expr.MsAbstractExprWithNmspc<T>
- Type Parameters:
T- analyzed expression, should be extension of ParserRuleContext or a rulectx wrapper class
Abstract base class for analyzing Microsoft SQL expressions with namespace support.
Provides functionality for managing table aliases, common table expressions (CTEs),
and resolving object references within a specific namespace context.
- Author:
- levsha_aa
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddRawTableReference(GenericColumn qualifiedTable) Adds an unaliased table reference to the namespace.booleanaddReference(String alias, GenericColumn object) Adds a reference to the namespace with the specified alias.Analyzes the given rule context and returns a list of column names.Methods inherited from class org.pgcodekeeper.core.parsers.antlr.ms.expr.MsAbstractExpr
getDepcies
-
Method Details
-
addReference
Adds a reference to the namespace with the specified alias. Clients may use this to setup pseudo-variable names before expression analysis.- Parameters:
alias- the alias name for the referenceobject- the database object being referenced, may be null for internal query names- Returns:
- true if the reference was added successfully, false if alias already exists
-
addRawTableReference
Adds an unaliased table reference to the namespace. Used for tables that don't have explicit aliases in the FROM clause.- Parameters:
qualifiedTable- the fully qualified table reference to add
-
analyze
Analyzes the given rule context and returns a list of column names. Implementations should process the specific Microsoft SQL expression type and extract relevant database dependencies and column information.- Parameters:
ruleCtx- the parser rule context to analyze- Returns:
- list of column names found during analysis
-