public final class PgCreateIndex extends PgParserAbstract
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 Details

    • PgCreateIndex

      public PgCreateIndex(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 context
      db - the PostgreSQL database object
      tablespace - the default tablespace name
      stream - the token stream for parsing
      settings - 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 definition
      tablespace - the default tablespace name
      schemaName - the schema name containing the index
      tableName - the table name for the index
      ind - the index object to populate
      db - the PostgreSQL database object
      location - the source location for error reporting
      stream - the token stream for parsing
      settings - the ISettings object
    • parseObject

      public void parseObject()
      Description copied from class: ParserAbstract
      Parses a database object from the current context. Must be implemented by concrete subclasses to handle specific object types.
      Specified by:
      parseObject in class ParserAbstract<PgDatabase>