Class ChFormatter

java.lang.Object
org.pgcodekeeper.core.formatter.AbstractFormatter
org.pgcodekeeper.core.formatter.ch.ChFormatter

public class ChFormatter extends AbstractFormatter
ClickHouse-specific SQL formatter implementation. Handles formatting of ClickHouse queries and DDL statements with dialect-specific rules.
  • Constructor Details

    • ChFormatter

      public ChFormatter(String source, int start, int stop, FormatConfiguration config)
      Constructs a new ClickHouse formatter instance.
      Parameters:
      source - The source SQL text to format
      start - The starting offset in the source text (inclusive)
      stop - The ending offset in the source text (exclusive)
      config - The formatting configuration options
  • Method Details

    • getFormatItems

      public List<FormatItem> getFormatItems()
      Gets the list of formatting changes to apply to the ClickHouse SQL text. Parses the SQL and applies formatting rules to create view statements and their subqueries.
      Returns:
      List of FormatItem objects representing the formatting changes