Skip to content
# Class: ValuesQuery

Defined in: packages/core/src/models/ValuesQuery.ts:23

Represents a VALUES query in SQL.

Extends ​

Implements ​

Constructors ​

Constructor ​

new ValuesQuery(tuples, columnAliases): ValuesQuery

Defined in: packages/core/src/models/ValuesQuery.ts:36

Parameters ​

tuples ​

TupleExpression[]

columnAliases ​

string[] | null

Returns ​

ValuesQuery

Overrides ​

SqlComponent.constructor

Properties ​

comments ​

comments: string[] | null = null

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

Implementation of ​

SelectQuery.comments

Inherited from ​

SqlComponent.comments


positionedComments ​

positionedComments: PositionedComment[] | null = null

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

Implementation of ​

SelectQuery.positionedComments

Inherited from ​

SqlComponent.positionedComments


kind ​

static kind: symbol

Defined in: packages/core/src/models/ValuesQuery.ts:24

Overrides ​

SqlComponent.kind


__selectQueryType ​

readonly __selectQueryType: "SelectQuery" = 'SelectQuery'

Defined in: packages/core/src/models/ValuesQuery.ts:25

Implementation of ​

SelectQuery.__selectQueryType


headerComments ​

headerComments: string[] | null = null

Defined in: packages/core/src/models/ValuesQuery.ts:26

Implementation of ​

SelectQuery.headerComments


withClause ​

withClause: WithClause | null = null

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


tuples ​

tuples: TupleExpression[]

Defined in: packages/core/src/models/ValuesQuery.ts:28


columnAliases ​

columnAliases: string[] | null

Defined in: packages/core/src/models/ValuesQuery.ts:34

Column aliases for the VALUES query. These represent the logical column names for each value tuple. Note: This property is optional and is not referenced during SQL output, but is used when converting to a SimpleSelectQuery.

Methods ​

getKind() ​

getKind(): symbol

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

Returns ​

symbol

Implementation of ​

SelectQuery.getKind

Inherited from ​

SqlComponent.getKind


accept() ​

accept<T&gt;(visitor): T

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

Type Parameters ​

T ​

T

Parameters ​

visitor ​

SqlComponentVisitor<T&gt;

Returns ​

T

Implementation of ​

SelectQuery.accept

Inherited from ​

SqlComponent.accept


toSqlString() ​

toSqlString(formatter): string

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

Parameters ​

formatter ​

SqlComponentVisitor<string&gt;

Returns ​

string

Implementation of ​

SelectQuery.toSqlString

Inherited from ​

SqlComponent.toSqlString


addPositionedComments() ​

addPositionedComments(position, comments): void

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

Add comments at a specific position

Parameters ​

position ​

"before" | "after"

comments ​

string[]

Returns ​

void

Implementation of ​

SelectQuery.addPositionedComments

Inherited from ​

SqlComponent.addPositionedComments


getPositionedComments() ​

getPositionedComments(position): string[]

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

Get comments for a specific position

Parameters ​

position ​

"before" | "after"

Returns ​

string[]

Implementation of ​

SelectQuery.getPositionedComments

Inherited from ​

SqlComponent.getPositionedComments


getAllPositionedComments() ​

getAllPositionedComments(): string[]

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

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

Returns ​

string[]

Implementation of ​

SelectQuery.getAllPositionedComments

Inherited from ​

SqlComponent.getAllPositionedComments


toSimpleQuery() ​

toSimpleQuery(): SimpleSelectQuery

Defined in: packages/core/src/models/ValuesQuery.ts:42

Returns ​

SimpleSelectQuery

Implementation of ​

SelectQuery.toSimpleQuery


toInsertQuery() ​

toInsertQuery(options): InsertQuery

Defined in: packages/core/src/models/ValuesQuery.ts:50

Converts this VALUES query into an INSERT statement definition.

Parameters ​

options ​

InsertQueryConversionOptions

Returns ​

InsertQuery

Remarks ​

The conversion may reorder the generated SELECT clause to align with the requested column order.

Implementation of ​

SelectQuery.toInsertQuery


toUpdateQuery() ​

toUpdateQuery(options): UpdateQuery

Defined in: packages/core/src/models/ValuesQuery.ts:58

Converts this VALUES query into an UPDATE statement definition.

Parameters ​

options ​

UpdateQueryConversionOptions

Returns ​

UpdateQuery

Remarks ​

The conversion may reorder the generated SELECT clause to align with the requested column order.

Implementation of ​

SelectQuery.toUpdateQuery


toDeleteQuery() ​

toDeleteQuery(options): DeleteQuery

Defined in: packages/core/src/models/ValuesQuery.ts:66

Converts this VALUES query into a DELETE statement definition.

Parameters ​

options ​

DeleteQueryConversionOptions

Returns ​

DeleteQuery

Remarks ​

The conversion may reorder the generated SELECT clause to align with the requested column order.

Implementation of ​

SelectQuery.toDeleteQuery


toMergeQuery() ​

toMergeQuery(options): MergeQuery

Defined in: packages/core/src/models/ValuesQuery.ts:74

Converts this VALUES query into a MERGE statement definition.

Parameters ​

options ​

MergeQueryConversionOptions

Returns ​

MergeQuery

Remarks ​

The conversion may reorder the generated SELECT clause to align with the requested column order.

Implementation of ​

SelectQuery.toMergeQuery


setParameter() ​

setParameter(name, value): this

Defined in: packages/core/src/models/ValuesQuery.ts:83

Sets the value of a parameter by name in this query.

Parameters ​

name ​

string

Parameter name

value ​

SqlParameterValue

Value to set

Returns ​

this

Implementation of ​

SelectQuery.setParameter

Released under the MIT License.