Class ChAbstractExprWithNmspc<T>
java.lang.Object
org.pgcodekeeper.core.database.base.parser.antlr.AbstractExpr
org.pgcodekeeper.core.database.ch.parser.expr.ChAbstractExpr
org.pgcodekeeper.core.database.ch.parser.expr.ChAbstractExprWithNmspc<T>
- Direct Known Subclasses:
ChExprWithNmspc,ChSelect
Abstract class extending ChAbstractExpr with namespace support for SQL expression analysis.
Handles table aliases, CTEs (Common Table Expressions) and namespace management.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddRawTableReference(ObjectReference qualifiedTable) Adds an unaliased table reference to the namespace.voidaddReference(String alias) Adds a reference with the given aliasAnalyzes the given SQL context and returns a list of processing results.findReference(String schema, String name, String column) Methods inherited from class org.pgcodekeeper.core.database.base.parser.antlr.AbstractExpr
addDependency, addDependency, addDependency, addReference, addVariable, getDependencies
-
Method Details
-
findReference
- Overrides:
findReferencein classAbstractExpr- Parameters:
schema- optional schema qualification of name, may be nullname- alias of the referenced objectcolumn- optional referenced column alias, may be null- Returns:
- a pair of (Alias, Dealiased name) where Alias is the given name.
Dealiased name can be null if the name is internal to the query
and is not a reference to external table.
null if the name is not found
-
addReference
Adds a reference with the given alias- Parameters:
alias- the alias name to register
-
addRawTableReference
Adds an unaliased table reference to the namespace.- Parameters:
qualifiedTable- the table reference to add
-
analyze
Analyzes the given SQL context and returns a list of processing results. Must be implemented by concrete subclasses.- Parameters:
ruleCtx- the ANTLR context to analyze- Returns:
- list of analysis results (implementation-dependent)
-