Class PgFormatter

java.lang.Object
org.pgcodekeeper.core.database.base.formatter.AbstractFormatter
org.pgcodekeeper.core.database.pg.formatter.PgFormatter
All Implemented Interfaces:
IFormatter

public class PgFormatter extends AbstractFormatter
PostgreSQL-specific SQL formatter implementation. Handles formatting of PostgreSQL functions and SQL statements with PostgreSQL-specific syntax rules.
  • Constructor Details

    • PgFormatter

      public PgFormatter(String source, int offset, int length, IFormatConfiguration config)
      Constructs a new PostgreSQL formatter instance.
      Parameters:
      source - The source SQL text to format
      offset - Starting offset in the source text
      length - Length of text to format
      config - Formatting configuration options
  • Method Details

    • getFormatItems

      public List<FormatItem> getFormatItems()
      Description copied from interface: IFormatter
      Gets the list of formatting changes to apply to the SQL text. Parses the SQL and applies formatting rules based on the configuration.
      Returns:
      List of FormatItem objects representing formatting changes