Class ChSQLOverridesListener
java.lang.Object
org.pgcodekeeper.core.parsers.antlr.base.CustomParserListener<ChDatabase>
org.pgcodekeeper.core.parsers.antlr.ch.ChSQLOverridesListener
- All Implemented Interfaces:
AntlrContextProcessor<CHParser.Ch_fileContext>,ChSqlContextProcessor
public final class ChSQLOverridesListener
extends CustomParserListener<ChDatabase>
implements ChSqlContextProcessor
ANTLR listener for processing ClickHouse SQL statements with override support.
Handles privilege statements and applies statement overrides.
-
Constructor Summary
ConstructorsConstructorDescriptionChSQLOverridesListener(ChDatabase database, String filename, ParserListenerMode mode, List<Object> errors, IMonitor monitor, Map<PgStatement, StatementOverride> overrides, ISettings settings) 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.parsers.antlr.base.CustomParserListener
handleUnresolvedReference
-
Constructor Details
-
ChSQLOverridesListener
public ChSQLOverridesListener(ChDatabase database, String filename, ParserListenerMode mode, List<Object> errors, IMonitor monitor, Map<PgStatement, StatementOverride> overrides, ISettings settings) Creates a new listener for ClickHouse SQL with override support.- Parameters:
database- the target database schemafilename- name of the file being parsedmode- parsing modeerrors- list to collect parsing errorsmonitor- progress monitor for cancellation supportoverrides- map of statement overrides to applysettings- application settings
-
-
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
-