java.lang.Object
org.pgcodekeeper.core.parsers.antlr.pg.rulectx.SelectStmt

public class SelectStmt extends Object
Merging wrapper for select_stmt/select_stmt_no_parens. Provides a unified interface for working with both parenthesized and non-parenthesized SELECT statements in PostgreSQL syntax.
Author:
levsha_aa
  • Constructor Details

    • SelectStmt

      public SelectStmt(SQLParser.Select_stmtContext select)
      Creates a wrapper for a parenthesized SELECT statement.
      Parameters:
      select - the SELECT statement context with parentheses
    • SelectStmt

      public SelectStmt(SQLParser.Select_stmt_no_parensContext select)
      Creates a wrapper for a non-parenthesized SELECT statement.
      Parameters:
      select - the SELECT statement context without parentheses
  • Method Details

    • getCtx

      public org.antlr.v4.runtime.ParserRuleContext getCtx()
      Returns the underlying parser rule context.
      Returns:
      the parser rule context for this SELECT statement
    • withClause

      public SQLParser.With_clauseContext withClause()
      Returns the WITH clause context if present.
      Returns:
      the WITH clause context or null if not present
    • selectOps

      public SelectOps selectOps()
      Returns the SELECT operations wrapper.
      Returns:
      wrapper for the SELECT operations part of the statement
    • afterOps

      public List<SQLParser.After_opsContext> afterOps()
      Returns the list of operations that come after the main SELECT.
      Returns:
      list of after operations contexts (ORDER BY, LIMIT, etc.)