Class MsCustomParserListener

java.lang.Object
org.pgcodekeeper.core.database.base.parser.CustomParserListener<MsDatabase>
org.pgcodekeeper.core.database.ms.parser.MsCustomParserListener
All Implemented Interfaces:
AntlrContextProcessor<TSQLParser.Tsql_fileContext>, IMsContextProcessor

public final class MsCustomParserListener extends CustomParserListener<MsDatabase> implements IMsContextProcessor
Custom ANTLR listener for parsing Microsoft SQL Server (T-SQL) statements. Processes CREATE, ALTER, DROP statements and builds database schema model.
  • Constructor Details

    • MsCustomParserListener

      public MsCustomParserListener(MsDatabase database, String filename, ParserListenerMode mode, DiffSettings diffSettings)
      Creates a new Microsoft SQL Server parser listener.
      Parameters:
      database - the target database schema to populate
      filename - name of the file being parsed
      mode - parsing mode
      diffSettings - unified context object containing settings, monitor, and error accumulator
  • 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 all batches and statements in the file.
      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
    • clause

      public void clause(TSQLParser.St_clauseContext st)
      Processes a single T-SQL clause
      Parameters:
      st - the clause context to process