Class PgAlterTable
java.lang.Object
org.pgcodekeeper.core.database.base.parser.statement.ParserAbstract<PgDatabase>
org.pgcodekeeper.core.database.pg.parser.statement.PgParserAbstract
org.pgcodekeeper.core.database.pg.parser.statement.PgTableAbstract
org.pgcodekeeper.core.database.pg.parser.statement.PgAlterTable
Parser for PostgreSQL ALTER TABLE statements.
This class handles parsing of table alterations including adding/dropping columns, modifying constraints, changing table properties, managing triggers and rules, setting table ownership, and handling Greenplum partition templates.
-
Constructor Summary
ConstructorsConstructorDescriptionPgAlterTable(SQLParser.Alter_table_statementContext ctx, PgDatabase db, String tablespace, org.antlr.v4.runtime.CommonTokenStream stream, ISettings settings) Constructs a new AlterTable parser. -
Method Summary
Modifier and TypeMethodDescriptionparseAlterTableConstraint(SQLParser.Table_actionContext tableAction, PgConstraint constrBlank, String schemaName, String tableName, String location) static voidparseGpPartitionTemplate(GpPartitionTable tabl, SQLParser.Alter_partition_gpContext alterPartition, org.antlr.v4.runtime.CommonTokenStream stream) Parses Greenplum partition template specifications from ALTER PARTITION clause.voidParses a database object from the current context.Methods inherited from class org.pgcodekeeper.core.database.pg.parser.statement.PgParserAbstract
fillOptionParams, fillOptionParams, getIdentifiers, getIdentifiers, getIdentifiers, getTypeName, parseArguments, parseOperatorSignature, parseSignature, unquoteQuotedStringMethods inherited from class org.pgcodekeeper.core.database.base.parser.statement.ParserAbstract
getFullCtxText, getFullCtxText, getFullCtxText, getSafe, getSafe, parseArgMode, parseObject
-
Constructor Details
-
PgAlterTable
public PgAlterTable(SQLParser.Alter_table_statementContext ctx, PgDatabase db, String tablespace, org.antlr.v4.runtime.CommonTokenStream stream, ISettings settings) Constructs a new AlterTable parser.- Parameters:
ctx- the ALTER TABLE statement contextdb- the PostgreSQL database objecttablespace- the default tablespace namestream- the token stream for parsingsettings- the ISettings object
-
-
Method Details
-
parseObject
public void parseObject()Description copied from class:ParserAbstractParses a database object from the current context. Must be implemented by concrete subclasses to handle specific object types.- Specified by:
parseObjectin classParserAbstract<PgDatabase>
-
parseGpPartitionTemplate
public static void parseGpPartitionTemplate(GpPartitionTable tabl, SQLParser.Alter_partition_gpContext alterPartition, org.antlr.v4.runtime.CommonTokenStream stream) Parses Greenplum partition template specifications from ALTER PARTITION clause.- Parameters:
tabl- the Greenplum partitioned table to modifyalterPartition- the ALTER PARTITION contextstream- the token stream for parsing
-
parseAlterTableConstraint
public PgConstraint parseAlterTableConstraint(SQLParser.Table_actionContext tableAction, PgConstraint constrBlank, String schemaName, String tableName, String location)
-