Class SQLOverridesListener

java.lang.Object
org.pgcodekeeper.core.parsers.antlr.base.CustomParserListener<PgDatabase>
org.pgcodekeeper.core.parsers.antlr.pg.SQLOverridesListener
All Implemented Interfaces:
AntlrContextProcessor<SQLParser.SqlContext>, SqlContextProcessor

public final class SQLOverridesListener extends CustomParserListener<PgDatabase> implements SqlContextProcessor
Custom ANTLR listener for processing PostgreSQL SQL statements with override support. Handles schema and ownership changes while applying statement overrides.
  • Constructor Details

    • SQLOverridesListener

      public SQLOverridesListener(PgDatabase db, String filename, ParserListenerMode mode, List<Object> errors, IMonitor mon, Map<PgStatement,StatementOverride> overrides, ISettings settings)
      Creates a new listener with override support.
      Parameters:
      db - the target database schema
      filename - name of the file being parsed
      mode - parsing mode
      errors - list to collect parsing errors
      mon - progress monitor for cancellation support
      overrides - map of statement overrides to apply
      settings - application settings
  • Method Details

    • process

      public void process(SQLParser.SqlContext rootCtx, org.antlr.v4.runtime.CommonTokenStream stream)
      Processes the complete SQL file context. Extracts and processes schema statements that may need overrides.
      Specified by:
      process in interface AntlrContextProcessor<SQLParser.SqlContext>
      Parameters:
      rootCtx - the root file context from ANTLR parser
      stream - the token stream associated with the context