Class ChOverridesListener
java.lang.Object
org.pgcodekeeper.core.database.base.parser.CustomParserListener<ChDatabase>
org.pgcodekeeper.core.database.ch.parser.ChOverridesListener
- All Implemented Interfaces:
AntlrContextProcessor<CHParser.Ch_fileContext>,IChContextProcessor
public final class ChOverridesListener
extends CustomParserListener<ChDatabase>
implements IChContextProcessor
ANTLR listener for processing ClickHouse SQL statements with override support.
Handles privilege statements and applies statement overrides.
-
Constructor Summary
ConstructorsConstructorDescriptionChOverridesListener(ChDatabase database, String filename, ParserListenerMode mode, DiffSettings diffSettings, Map<AbstractStatement, StatementOverride> overrides) Creates a new listener for ClickHouse SQL with override support. -
Method Summary
Modifier and TypeMethodDescriptionvoidprocess(CHParser.Ch_fileContext rootCtx, org.antlr.v4.runtime.CommonTokenStream stream) Processes the complete ClickHouse SQL file context.Methods inherited from class org.pgcodekeeper.core.database.base.parser.CustomParserListener
getMonitor, getSettings, handleUnresolvedReference
-
Constructor Details
-
ChOverridesListener
public ChOverridesListener(ChDatabase database, String filename, ParserListenerMode mode, DiffSettings diffSettings, Map<AbstractStatement, StatementOverride> overrides) Creates a new listener for ClickHouse SQL with override support.- Parameters:
database- the target database schemafilename- name of the file being parsedmode- parsing modediffSettings- unified context object containing settings, monitor, and error accumulatoroverrides- map of statement overrides to apply
-
-
Method Details
-
process
Processes the complete ClickHouse SQL file context. Extracts and processes all queries in the file.- Specified by:
processin interfaceAntlrContextProcessor<CHParser.Ch_fileContext>- Parameters:
rootCtx- the root file context from ANTLR parserstream- the token stream associated with the context
-