Skip to content
# Class: InsertQuery

Defined in: packages/core/src/models/InsertQuery.ts:7

Extends

Constructors

Constructor

new InsertQuery(params): InsertQuery

Defined in: packages/core/src/models/InsertQuery.ts:16

Parameters

params
insertClause

InsertClause

InsertClause instance (target table and columns)

selectQuery?

null | SelectQuery

SELECT/VALUES query (required)

Returns

InsertQuery

Overrides

SqlComponent.constructor

Properties

kind

static kind: symbol

Defined in: packages/core/src/models/InsertQuery.ts:8

Overrides

SqlComponent.kind


insertClause

insertClause: InsertClause

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


selectQuery

selectQuery: null | SelectQuery

Defined in: packages/core/src/models/InsertQuery.ts:10


comments

comments: null | string[] = null

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

Inherited from

SqlComponent.comments


positionedComments

positionedComments: null | PositionedComment[] = null

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

Inherited from

SqlComponent.positionedComments

Methods

getKind()

getKind(): symbol

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

Returns

symbol

Inherited from

SqlComponent.getKind


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

Inherited from

SqlComponent.accept


toSqlString()

toSqlString(formatter): string

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

Parameters

formatter

SqlComponentVisitor<string&gt;

Returns

string

Inherited from

SqlComponent.toSqlString


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

Inherited from

SqlComponent.addPositionedComments


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[]

Inherited from

SqlComponent.getPositionedComments


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[]

Inherited from

SqlComponent.getAllPositionedComments

Released under the MIT License.