Class CustomChSQLParserListener
java.lang.Object
org.pgcodekeeper.core.parsers.antlr.base.CustomParserListener<ChDatabase>
org.pgcodekeeper.core.parsers.antlr.ch.CustomChSQLParserListener
- All Implemented Interfaces:
AntlrContextProcessor<CHParser.Ch_fileContext>,ChSqlContextProcessor
public final class CustomChSQLParserListener
extends CustomParserListener<ChDatabase>
implements ChSqlContextProcessor
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
ConstructorsConstructorDescriptionCustomChSQLParserListener(ChDatabase database, String filename, ParserListenerMode mode, List<Object> errors, IMonitor monitor, ISettings settings) 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.parsers.antlr.base.CustomParserListener
handleUnresolvedReference
-
Constructor Details
-
CustomChSQLParserListener
public CustomChSQLParserListener(ChDatabase database, String filename, ParserListenerMode mode, List<Object> errors, IMonitor monitor, ISettings settings) Creates a new ClickHouse SQL parser listener.- Parameters:
database- the target database schema to populatefilename- name of the file being parsedmode- parsing modeerrors- list to collect parsing errorsmonitor- progress monitor for cancellation supportsettings- application settings
-
-
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
-