java.lang.Object
org.pgcodekeeper.core.parsers.antlr.pg.expr.AbstractExpr
org.pgcodekeeper.core.parsers.antlr.pg.expr.ValueExpr

public final class ValueExpr extends AbstractExpr
Parser for value expressions with namespace support.
  • Constructor Details

    • ValueExpr

      public ValueExpr(MetaContainer meta)
      Creates a ValueExpr parser with meta container.
      Parameters:
      meta - the meta container with schema information
  • Method Details

    • analyze

      public ModPair<String,String> analyze(Vex vex)
      Analyzes a value expression and returns its type information.

      Alternative checks are ordered for performance according to their usage frequency in real code. Statistics gathered on the internal DB codebase as of 2019-10-16. Also note that some checks are constrained by the grammar to go before others. Otherwise, some alternatives would be mis-processed as a wrong kind.

    • function

      public ModPair<String,String> function(SQLParser.Function_callContext function)
      Analyzes a function call and returns its type information.
      Parameters:
      function - the function call context to analyze
      Returns:
      pair containing the function name and return type
    • orderBy

      public void orderBy(SQLParser.Orderby_clauseContext orderBy)
      Processes an ORDER BY clause.
      Parameters:
      orderBy - the ORDER BY clause context
    • window

      public void window(SQLParser.Window_definitionContext window)
      Processes a WINDOW definition.
      Parameters:
      window - the WINDOW definition context