Skip to content
# Abstract Class: SqlComponent

Defined in: packages/core/src/models/SqlComponent.ts:9

Extended by

Constructors

Constructor

new SqlComponent(): SqlComponent

Returns

SqlComponent

Properties

kind

static kind: symbol

Defined in: packages/core/src/models/SqlComponent.ts:11


comments

comments: null | string[] = null

Defined in: packages/core/src/models/SqlComponent.ts:27


positionedComments

positionedComments: null | PositionedComment[] = null

Defined in: packages/core/src/models/SqlComponent.ts:30

Methods

getKind()

getKind(): symbol

Defined in: packages/core/src/models/SqlComponent.ts:13

Returns

symbol


accept()

accept<T&gt;(visitor): T

Defined in: packages/core/src/models/SqlComponent.ts:17

Type Parameters

T

T

Parameters

visitor

SqlComponentVisitor<T&gt;

Returns

T


toSqlString()

toSqlString(formatter): string

Defined in: packages/core/src/models/SqlComponent.ts:21

Parameters

formatter

SqlComponentVisitor<string&gt;

Returns

string


addPositionedComments()

addPositionedComments(position, comments): void

Defined in: packages/core/src/models/SqlComponent.ts:35

Add comments at a specific position

Parameters

position

"before" | "after"

comments

string[]

Returns

void


getPositionedComments()

getPositionedComments(position): string[]

Defined in: packages/core/src/models/SqlComponent.ts:54

Get comments for a specific position

Parameters

position

"before" | "after"

Returns

string[]


getAllPositionedComments()

getAllPositionedComments(): string[]

Defined in: packages/core/src/models/SqlComponent.ts:64

Get all positioned comments as a flat array in order (before, after)

Returns

string[]

Released under the MIT License.