Class TSQLOverridesListener

java.lang.Object
org.pgcodekeeper.core.parsers.antlr.base.CustomParserListener<MsDatabase>
org.pgcodekeeper.core.parsers.antlr.ms.TSQLOverridesListener
All Implemented Interfaces:
AntlrContextProcessor<TSQLParser.Tsql_fileContext>, TSqlContextProcessor

public final class TSQLOverridesListener extends CustomParserListener<MsDatabase> implements TSqlContextProcessor
Custom ANTLR listener for processing Microsoft SQL Server (T-SQL) statements with override support. Handles authorization and privilege statements while applying statement overrides.
  • Constructor Details

    • TSQLOverridesListener

      public TSQLOverridesListener(MsDatabase db, String filename, ParserListenerMode mode, List<Object> errors, IMonitor mon, Map<PgStatement,StatementOverride> overrides, ISettings settings)
      Creates a new T-SQL listener with override support.
      Parameters:
      db - the target Microsoft SQL Server database schema
      filename - name of the file being parsed
      mode - parsing mode (NORMAL or SCRIPT)
      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(TSQLParser.Tsql_fileContext rootCtx, org.antlr.v4.runtime.CommonTokenStream stream)
      Processes the complete T-SQL file context. Extracts and processes batches and statements that may need overrides.
      Specified by:
      process in interface AntlrContextProcessor<TSQLParser.Tsql_fileContext>
      Parameters:
      rootCtx - the root file context from ANTLR parser
      stream - the token stream associated with the context