Class ChFormatter
java.lang.Object
org.pgcodekeeper.core.formatter.AbstractFormatter
org.pgcodekeeper.core.formatter.ch.ChFormatter
ClickHouse-specific SQL formatter implementation.
Handles formatting of ClickHouse queries and DDL statements with dialect-specific rules.
-
Constructor Summary
ConstructorsConstructorDescriptionChFormatter(String source, int start, int stop, FormatConfiguration config) Constructs a new ClickHouse formatter instance. -
Method Summary
Modifier and TypeMethodDescriptionGets the list of formatting changes to apply to the ClickHouse SQL text.
-
Constructor Details
-
ChFormatter
Constructs a new ClickHouse formatter instance.- Parameters:
source- The source SQL text to formatstart- 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
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
-