java.lang.Object
org.pgcodekeeper.core.database.base.parser.antlr.AbstractExpr
Direct Known Subclasses:
ChAbstractExpr, MsAbstractExpr, PgAbstractExpr

public abstract class AbstractExpr extends Object
Abstract base class for SQL expression analysis.
  • Method Details

    • getDependencies

      public Set<PgObjLocation> getDependencies()
      Gets an unmodifiable set of database object dependencies found in this expression.
      Returns:
      set of PgObjLocation representing dependencies
    • findReference

      public Map.Entry<String,GenericColumn> findReference(String schema, String name, String column)
      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
    • addDependency

      public void addDependency(PgObjLocation dependency)
      Adds a dependency
      Parameters:
      dependency - dependency
    • addReference

      public void addReference(GenericColumn genericColumn, org.antlr.v4.runtime.ParserRuleContext ctx)
      Adds a dependency with parser rule context as a reference
      Parameters:
      genericColumn - object location
      ctx - parser rule context
    • addVariable

      public void addVariable(GenericColumn genericColumn, org.antlr.v4.runtime.ParserRuleContext ctx)
      Adds a dependency with parser rule context as a variable
      Parameters:
      genericColumn - object location
      ctx - rule context
    • addDependency

      public void addDependency(GenericColumn genericColumn, org.antlr.v4.runtime.ParserRuleContext ctx, PgObjLocation.LocationType type)
      Adds a dependency with parser rule context and dependency type
      Parameters:
      genericColumn - object location
      ctx - rule context
      type - dependency type
    • addDependency

      public void addDependency(GenericColumn genericColumn, org.antlr.v4.runtime.ParserRuleContext ctx)
      Adds a non-system dependency
      Parameters:
      genericColumn - object location
      ctx - rule context