Class CreateIndex
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.CreateIndex
Parser for PostgreSQL CREATE INDEX statements.
This class handles parsing of index definitions including unique indexes, partial indexes, expression indexes, and various index parameters such as storage parameters, tablespace, and included columns.
-
Constructor Summary
ConstructorsConstructorDescriptionCreateIndex(SQLParser.Create_index_statementContext ctx, PgDatabase db, String tablespace, org.antlr.v4.runtime.CommonTokenStream stream, ISettings settings) Constructs a new CreateIndex parser. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidparseIndex(SQLParser.Index_restContext rest, String tablespace, String schemaName, String tableName, PgIndex ind, PgDatabase db, String location, org.antlr.v4.runtime.CommonTokenStream stream, ISettings settings) Parses index definition from an index rest context and populates the given index object.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
-
CreateIndex
public CreateIndex(SQLParser.Create_index_statementContext ctx, PgDatabase db, String tablespace, org.antlr.v4.runtime.CommonTokenStream stream, ISettings settings) Constructs a new CreateIndex parser.- Parameters:
ctx- the CREATE INDEX statement contextdb- the PostgreSQL database objecttablespace- the default tablespace namestream- the token stream for parsingsettings- the ISettings object
-
-
Method Details
-
parseIndex
public static void parseIndex(SQLParser.Index_restContext rest, String tablespace, String schemaName, String tableName, PgIndex ind, PgDatabase db, String location, org.antlr.v4.runtime.CommonTokenStream stream, ISettings settings) Parses index definition from an index rest context and populates the given index object.- Parameters:
rest- the index rest context containing index definitiontablespace- the default tablespace nameschemaName- the schema name containing the indextableName- the table name for the indexind- the index object to populatedb- the PostgreSQL database objectlocation- the source location for error reportingstream- the token stream for parsingsettings- the ISettings object
-
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>
-