Class SQLOverridesListener
java.lang.Object
org.pgcodekeeper.core.parsers.antlr.base.CustomParserListener<PgDatabase>
org.pgcodekeeper.core.parsers.antlr.pg.SQLOverridesListener
- All Implemented Interfaces:
AntlrContextProcessor<SQLParser.SqlContext>,SqlContextProcessor
public final class SQLOverridesListener
extends CustomParserListener<PgDatabase>
implements SqlContextProcessor
Custom ANTLR listener for processing PostgreSQL SQL statements with override support.
Handles schema and ownership changes while applying statement overrides.
-
Constructor Summary
ConstructorsConstructorDescriptionSQLOverridesListener(PgDatabase db, String filename, ParserListenerMode mode, List<Object> errors, IMonitor mon, Map<PgStatement, StatementOverride> overrides, ISettings settings) Creates a new listener with override support. -
Method Summary
Modifier and TypeMethodDescriptionvoidprocess(SQLParser.SqlContext rootCtx, org.antlr.v4.runtime.CommonTokenStream stream) Processes the complete SQL file context.Methods inherited from class org.pgcodekeeper.core.parsers.antlr.base.CustomParserListener
handleUnresolvedReference
-
Constructor Details
-
SQLOverridesListener
public SQLOverridesListener(PgDatabase db, String filename, ParserListenerMode mode, List<Object> errors, IMonitor mon, Map<PgStatement, StatementOverride> overrides, ISettings settings) Creates a new listener with override support.- Parameters:
db- the target database schemafilename- name of the file being parsedmode- parsing modeerrors- list to collect parsing errorsmon- progress monitor for cancellation supportoverrides- map of statement overrides to applysettings- application settings
-
-
Method Details
-
process
Processes the complete SQL file context. Extracts and processes schema statements that may need overrides.- Specified by:
processin interfaceAntlrContextProcessor<SQLParser.SqlContext>- Parameters:
rootCtx- the root file context from ANTLR parserstream- the token stream associated with the context
-