Class ChCustomParserListener
java.lang.Object
org.pgcodekeeper.core.database.base.parser.CustomParserListener<ChDatabase>
org.pgcodekeeper.core.database.ch.parser.ChCustomParserListener
- All Implemented Interfaces:
AntlrContextProcessor<CHParser.Ch_fileContext>,IChContextProcessor
public final class ChCustomParserListener
extends CustomParserListener<ChDatabase>
implements IChContextProcessor
Custom ANTLR listener for parsing ClickHouse SQL statements.
Processes CREATE, ALTER, DROP statements and privilege grants,
building a database schema model from the parsed statements.
-
Constructor Summary
ConstructorsConstructorDescriptionChCustomParserListener(ChDatabase database, String filename, ParserListenerMode mode, DiffSettings diffSettings) Creates a new ClickHouse SQL parser listener. -
Method Summary
Modifier and TypeMethodDescriptionvoidprocess(CHParser.Ch_fileContext rootCtx, org.antlr.v4.runtime.CommonTokenStream stream) Processes the ANTLR parser rule context with the given token streamMethods inherited from class org.pgcodekeeper.core.database.base.parser.CustomParserListener
getMonitor, getSettings, handleUnresolvedReference
-
Constructor Details
-
ChCustomParserListener
public ChCustomParserListener(ChDatabase database, String filename, ParserListenerMode mode, DiffSettings diffSettings) Creates a new ClickHouse SQL 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
Description copied from interface:AntlrContextProcessorProcesses the ANTLR parser rule context with the given token stream- Specified by:
processin interfaceAntlrContextProcessor<CHParser.Ch_fileContext>- Parameters:
rootCtx- the root parser rule context to processstream- the token stream associated with the context
-