Class PgOverridesListener
java.lang.Object
org.pgcodekeeper.core.database.base.parser.CustomParserListener<PgDatabase>
org.pgcodekeeper.core.database.pg.parser.PgOverridesListener
- All Implemented Interfaces:
AntlrContextProcessor<SQLParser.SqlContext>,IPgContextProcessor
public final class PgOverridesListener
extends CustomParserListener<PgDatabase>
implements IPgContextProcessor
Custom ANTLR listener for processing PostgreSQL SQL statements with override support.
Handles schema and ownership changes while applying statement overrides.
-
Constructor Summary
ConstructorsConstructorDescriptionPgOverridesListener(PgDatabase db, String filename, ParserListenerMode mode, DiffSettings diffSettings, Map<AbstractStatement, StatementOverride> overrides) 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.database.base.parser.CustomParserListener
getMonitor, getSettings, handleUnresolvedReference
-
Constructor Details
-
PgOverridesListener
public PgOverridesListener(PgDatabase db, String filename, ParserListenerMode mode, DiffSettings diffSettings, Map<AbstractStatement, StatementOverride> overrides) Creates a new listener with override support.- Parameters:
db- 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 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
-