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 Summary
ConstructorsConstructorDescriptionMsCustomParserListener(MsDatabase database, String filename, ParserListenerMode mode, DiffSettings diffSettings) Creates a new Microsoft SQL Server parser listener. -
Method Summary
Modifier and TypeMethodDescriptionvoidProcesses a single T-SQL clausevoidprocess(TSQLParser.Tsql_fileContext rootCtx, org.antlr.v4.runtime.CommonTokenStream stream) Processes the complete T-SQL file context.Methods inherited from class org.pgcodekeeper.core.database.base.parser.CustomParserListener
getMonitor, getSettings, handleUnresolvedReference
-
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 populatefilename- name of the file being parsedmode- parsing modediffSettings- 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:
processin interfaceAntlrContextProcessor<TSQLParser.Tsql_fileContext>- Parameters:
rootCtx- the root file context from ANTLR parserstream- the token stream associated with the context
-
clause
Processes a single T-SQL clause- Parameters:
st- the clause context to process
-