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<ObjectLocation> getDependencies()
      Gets an unmodifiable set of database object dependencies found in this expression.
      Returns:
      set of ObjectLocation representing dependencies
    • findReference

      public Map.Entry<String,ObjectReference> 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(ObjectLocation dependency)
      Adds a dependency
      Parameters:
      dependency - dependency
    • addReference

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

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

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

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