Class ChAbstractExprWithNmspc<T>

Direct Known Subclasses:
ChExprWithNmspc, ChSelect

public abstract class ChAbstractExprWithNmspc<T> extends ChAbstractExpr
Abstract class extending ChAbstractExpr with namespace support for SQL expression analysis. Handles table aliases, CTEs (Common Table Expressions) and namespace management.
  • Method Details

    • findReference

      public Map.Entry<String,ObjectReference> findReference(String schema, String name, String column)
      Overrides:
      findReference in class AbstractExpr
      Parameters:
      schema - optional schema qualification of name, may be null
      name - alias of the referenced object
      column - 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

      public void addReference(String alias)
      Adds a reference with the given alias
      Parameters:
      alias - the alias name to register
    • addRawTableReference

      public void addRawTableReference(ObjectReference qualifiedTable)
      Adds an unaliased table reference to the namespace.
      Parameters:
      qualifiedTable - the table reference to add
    • analyze

      public abstract List<String> analyze(T ruleCtx)
      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)