English | 简体中文

api-docs / org.ktorm.support.postgresql / PostgreSqlDialect / createSqlFormatter

createSqlFormatter

open fun createSqlFormatter(
    database: Database,
    beautifySql: Boolean,
    indentSize: Int
): SqlFormatter
(source code)

Overrides SqlDialect.createSqlFormatter

Create a SqlFormatter instance, formatting SQL expressions as strings with their execution arguments.

Parameters

database - the current database instance executing the formatted SQL.

beautifySql - if we should output beautiful SQL strings with line-wrapping and indentation.

indentSize - the indent size.

Return
a SqlFormatter object, generally typed of subclasses to support dialect-specific sql expressions.