Class PgStatementFormatter
java.lang.Object
org.pgcodekeeper.core.database.base.formatter.StatementFormatter
org.pgcodekeeper.core.database.pg.formatter.PgStatementFormatter
PostgreSQL-specific implementation of SQL statement formatting.
Handles formatting of PL/pgSQL functions and SQL statements with PostgreSQL-specific rules.
-
Constructor Summary
ConstructorsConstructorDescriptionPgStatementFormatter(int start, int stop, String functionDefinition, int defOffset, String language, IFormatConfiguration config) Constructs a formatter for PostgreSQL functions from string definition.PgStatementFormatter(int start, int stop, SQLParser.Function_bodyContext definition, org.antlr.v4.runtime.CommonTokenStream tokenStream, IFormatConfiguration config) Constructs a formatter for PostgreSQL functions from parsed context. -
Method Summary
Methods inherited from class org.pgcodekeeper.core.database.base.formatter.StatementFormatter
format, getChanges
-
Constructor Details
-
PgStatementFormatter
public PgStatementFormatter(int start, int stop, String functionDefinition, int defOffset, String language, IFormatConfiguration config) Constructs a formatter for PostgreSQL functions from string definition.- Parameters:
start- The starting offset in the source textstop- The ending offset in the source textfunctionDefinition- The function definition text to formatdefOffset- The function definition's offset in the sourcelanguage- The language of the function ('SQL' or 'plpgsql')config- The formatting configuration
-
PgStatementFormatter
public PgStatementFormatter(int start, int stop, SQLParser.Function_bodyContext definition, org.antlr.v4.runtime.CommonTokenStream tokenStream, IFormatConfiguration config) Constructs a formatter for PostgreSQL functions from parsed context.- Parameters:
start- The starting offset in the source textstop- The ending offset in the source textdefinition- The parsed function body contexttokenStream- The token stream containing all tokensconfig- The formatting configuration
-
-
Method Details
-
getTokens
-