Skip to content
# Interface: CTEDecomposerOptions

Defined in: packages/core/src/transformers/CTEQueryDecomposer.ts:31

Options for CTEQueryDecomposer extending SqlFormatterOptions

Extends ​

Properties ​

addComments? ​

optional addComments: boolean

Defined in: packages/core/src/transformers/CTEQueryDecomposer.ts:33

Whether to add comments to decomposed queries showing metadata and dependencies


indentSize? ​

optional indentSize: number

Defined in: packages/core/src/transformers/SqlFormatter.ts:41

Number of spaces for indentation

Inherited from ​

SqlFormatterOptions.indentSize


indentChar? ​

optional indentChar: string

Defined in: packages/core/src/transformers/SqlFormatter.ts:43

Character to use for indentation (logical 'space'/'tab' or literal control character)

Inherited from ​

SqlFormatterOptions.indentChar


newline? ​

optional newline: NewlineOption

Defined in: packages/core/src/transformers/SqlFormatter.ts:45

Newline character style (logical 'lf'/'crlf'/'cr' or literal newline string)

Inherited from ​

SqlFormatterOptions.newline


keywordCase? ​

optional keywordCase: "none" | "upper" | "lower" | "preserve"

Defined in: packages/core/src/transformers/SqlFormatter.ts:47

Case transformation for SQL keywords

Inherited from ​

SqlFormatterOptions.keywordCase


commaBreak? ​

optional commaBreak: CommaBreakStyle

Defined in: packages/core/src/transformers/SqlFormatter.ts:49

Style for comma line breaks

Inherited from ​

SqlFormatterOptions.commaBreak


cteCommaBreak? ​

optional cteCommaBreak: CommaBreakStyle

Defined in: packages/core/src/transformers/SqlFormatter.ts:51

Style for comma line breaks inside WITH clause definitions

Inherited from ​

SqlFormatterOptions.cteCommaBreak


valuesCommaBreak? ​

optional valuesCommaBreak: CommaBreakStyle

Defined in: packages/core/src/transformers/SqlFormatter.ts:53

Style for comma line breaks inside VALUES clauses

Inherited from ​

SqlFormatterOptions.valuesCommaBreak


andBreak? ​

optional andBreak: AndBreakStyle

Defined in: packages/core/src/transformers/SqlFormatter.ts:55

Style for AND line breaks

Inherited from ​

SqlFormatterOptions.andBreak


orBreak? ​

optional orBreak: OrBreakStyle

Defined in: packages/core/src/transformers/SqlFormatter.ts:57

Style for OR line breaks

Inherited from ​

SqlFormatterOptions.orBreak


joinOnBreak? ​

optional joinOnBreak: JoinOnBreakStyle

Defined in: packages/core/src/transformers/SqlFormatter.ts:59

Style for JOIN ON line breaks

Inherited from ​

SqlFormatterOptions.joinOnBreak


exportComment? ​

optional exportComment: boolean | CommentExportMode

Defined in: packages/core/src/transformers/SqlFormatter.ts:61

Whether to export comments in formatted output

Inherited from ​

SqlFormatterOptions.exportComment


commentStyle? ​

optional commentStyle: CommentStyle

Defined in: packages/core/src/transformers/SqlFormatter.ts:63

Comment formatting style

Inherited from ​

SqlFormatterOptions.commentStyle


withClauseStyle? ​

optional withClauseStyle: WithClauseStyle

Defined in: packages/core/src/transformers/SqlFormatter.ts:65

Formatting style for WITH clauses

Inherited from ​

SqlFormatterOptions.withClauseStyle


parenthesesOneLine? ​

optional parenthesesOneLine: boolean

Defined in: packages/core/src/transformers/SqlFormatter.ts:67

Keep parentheses content on one line regardless of AND/OR break settings

Inherited from ​

SqlFormatterOptions.parenthesesOneLine


betweenOneLine? ​

optional betweenOneLine: boolean

Defined in: packages/core/src/transformers/SqlFormatter.ts:69

Keep BETWEEN expressions on one line regardless of AND break settings

Inherited from ​

SqlFormatterOptions.betweenOneLine


valuesOneLine? ​

optional valuesOneLine: boolean

Defined in: packages/core/src/transformers/SqlFormatter.ts:71

Keep VALUES clause on one line regardless of comma break settings

Inherited from ​

SqlFormatterOptions.valuesOneLine


inOneLine? ​

optional inOneLine: boolean

Defined in: packages/core/src/transformers/SqlFormatter.ts:73

Keep IN value lists on one line until oneLineMaxLength forces expansion

Inherited from ​

SqlFormatterOptions.inOneLine


joinOneLine? ​

optional joinOneLine: boolean

Defined in: packages/core/src/transformers/SqlFormatter.ts:75

Keep JOIN conditions on one line regardless of AND/OR break settings

Inherited from ​

SqlFormatterOptions.joinOneLine


caseOneLine? ​

optional caseOneLine: boolean

Defined in: packages/core/src/transformers/SqlFormatter.ts:77

Keep CASE expressions on one line regardless of formatting settings

Inherited from ​

SqlFormatterOptions.caseOneLine


subqueryOneLine? ​

optional subqueryOneLine: boolean

Defined in: packages/core/src/transformers/SqlFormatter.ts:79

Keep subqueries (inline queries) on one line regardless of formatting settings

Inherited from ​

SqlFormatterOptions.subqueryOneLine


indentNestedParentheses? ​

optional indentNestedParentheses: boolean

Defined in: packages/core/src/transformers/SqlFormatter.ts:81

Indent nested parentheses when boolean groups contain additional parentheses

Inherited from ​

SqlFormatterOptions.indentNestedParentheses


insertColumnsOneLine? ​

optional insertColumnsOneLine: boolean

Defined in: packages/core/src/transformers/SqlFormatter.ts:83

Keep INSERT column lists on one line regardless of comma break settings

Inherited from ​

SqlFormatterOptions.insertColumnsOneLine


whenOneLine? ​

optional whenOneLine: boolean

Defined in: packages/core/src/transformers/SqlFormatter.ts:85

Keep MERGE WHEN clause predicates on one line regardless of AND break settings

Inherited from ​

SqlFormatterOptions.whenOneLine


oneLineMaxLength? ​

optional oneLineMaxLength: number | null

Defined in: packages/core/src/transformers/SqlFormatter.ts:87

Maximum rendered width for opt-in one-line constructs. Use 0, null, or omit to disable the limit.

Inherited from ​

SqlFormatterOptions.oneLineMaxLength


joinConditionContinuationIndent? ​

optional joinConditionContinuationIndent: boolean

Defined in: packages/core/src/transformers/SqlFormatter.ts:89

Indent AND/OR continuation lines inside JOIN ON predicates

Inherited from ​

SqlFormatterOptions.joinConditionContinuationIndent


joinConditionOrderByDeclaration? ​

optional joinConditionOrderByDeclaration: boolean

Defined in: packages/core/src/transformers/SqlFormatter.ts:91

Reorder JOIN ON column comparisons to follow table declaration order

Inherited from ​

SqlFormatterOptions.joinConditionOrderByDeclaration


preset? ​

optional preset: "postgres" | "mysql" | "sqlserver" | "sqlite"

Defined in: packages/core/src/transformers/SqlFormatter.ts:107

Database preset for formatting style ('mysql', 'postgres', 'sqlserver', 'sqlite')

Inherited from ​

SqlFormatterOptions.preset


identifierEscape? ​

optional identifierEscape: IdentifierEscapeOption

Defined in: packages/core/src/transformers/SqlFormatter.ts:109

Identifier escape style (logical name like 'quote' or explicit delimiters)

Inherited from ​

SqlFormatterOptions.identifierEscape


identifierEscapeTarget? ​

optional identifierEscapeTarget: IdentifierEscapeTarget

Defined in: packages/core/src/transformers/SqlFormatter.ts:111

Identifier escape target: all identifiers or only identifiers that need escaping

Inherited from ​

SqlFormatterOptions.identifierEscapeTarget


parameterSymbol? ​

optional parameterSymbol: string | { start: string; end: string; }

Defined in: packages/core/src/transformers/SqlFormatter.ts:113

Parameter symbol configuration for SQL parameters

Inherited from ​

SqlFormatterOptions.parameterSymbol


parameterStyle? ​

optional parameterStyle: "named" | "indexed" | "anonymous" | "original"

Defined in: packages/core/src/transformers/SqlFormatter.ts:115

Style for parameter formatting

Inherited from ​

SqlFormatterOptions.parameterStyle


castStyle? ​

optional castStyle: CastStyle

Defined in: packages/core/src/transformers/SqlFormatter.ts:117

Preferred CAST rendering style

Inherited from ​

SqlFormatterOptions.castStyle


constraintStyle? ​

optional constraintStyle: ConstraintStyle

Defined in: packages/core/src/transformers/SqlFormatter.ts:119

Constraint rendering style (affects CREATE TABLE constraint layout)

Inherited from ​

SqlFormatterOptions.constraintStyle


sourceAliasStyle? ​

optional sourceAliasStyle: AliasKeywordStyle

Defined in: packages/core/src/transformers/SqlFormatter.ts:121

Source alias rendering style for FROM/JOIN sources

Inherited from ​

SqlFormatterOptions.sourceAliasStyle


columnAliasStyle? ​

optional columnAliasStyle: AliasKeywordStyle

Defined in: packages/core/src/transformers/SqlFormatter.ts:123

Column alias rendering style for SELECT items

Inherited from ​

SqlFormatterOptions.columnAliasStyle


orderByDefaultDirectionStyle? ​

optional orderByDefaultDirectionStyle: OrderByDefaultDirectionStyle

Defined in: packages/core/src/transformers/SqlFormatter.ts:125

Default ORDER BY direction rendering style

Inherited from ​

SqlFormatterOptions.orderByDefaultDirectionStyle

Released under the MIT License.