Class AlterTable
java.lang.Object
org.pgcodekeeper.core.parsers.antlr.base.statement.ParserAbstract<PgDatabase>
org.pgcodekeeper.core.parsers.antlr.pg.statement.PgParserAbstract
org.pgcodekeeper.core.parsers.antlr.pg.statement.TableAbstract
org.pgcodekeeper.core.parsers.antlr.pg.statement.AlterTable
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
ConstructorsConstructorDescriptionAlterTable(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(PartitionGpTable 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.parsers.antlr.pg.statement.PgParserAbstract
getIdentifiers, getIdentifiers, getIdentifiers, getTypeName, parseArguments, parseOperatorSignature, parseSignature, unquoteQuotedStringMethods inherited from class org.pgcodekeeper.core.parsers.antlr.base.statement.ParserAbstract
fillOptionParams, fillOptionParams, getFullCtxText, getFullCtxText, getFullCtxText, getSafe, getSafe, parseArgMode, parseObject
-
Constructor Details
-
AlterTable
public AlterTable(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(PartitionGpTable 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 AbstractConstraint parseAlterTableConstraint(SQLParser.Table_actionContext tableAction, PgConstraint constrBlank, String schemaName, String tableName, String location)
-