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 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 schema
      filename - name of the file being parsed
      mode - parsing mode
      errors - list to collect parsing errors
      monitor - progress monitor for cancellation support
      overrides - map of statement overrides to apply
      settings - application settings
  • Method Details

    • process

      public void process(CHParser.Ch_fileContext rootCtx, org.antlr.v4.runtime.CommonTokenStream stream)
      Processes the complete ClickHouse SQL file context. Extracts and processes all queries in the file.
      Specified by:
      process in interface AntlrContextProcessor<CHParser.Ch_fileContext>
      Parameters:
      rootCtx - the root file context from ANTLR parser
      stream - the token stream associated with the context