Skip to main content

Class: SelectStatement

Defined in: lang-sql/src/ast/select.ts:12

A complete SQL SELECT statement, including optional WITH, ORDER BY, LIMIT, and OFFSET clauses.

Implements

Constructors

Constructor

new SelectStatement(selectSet, orderBy?, limit?, offset?, withQueries?): SelectStatement

Defined in: lang-sql/src/ast/select.ts:13

Parameters

ParameterTypeDefault valueDescription
selectSetSelectSet | ValuesClauseundefinedThe primary query body.
orderByOrderByItem[]nullTop-level ORDER BY; null if omitted.
limitASTNodenullThe LIMIT expression; null if omitted.
offsetASTNodenullThe OFFSET expression; null if omitted.
withQueriesWithQuery[]nullWITH (CTE) definitions; null if no WITH clause is present.

Returns

SelectStatement

Properties

limit

limit: ASTNode = null

Defined in: lang-sql/src/ast/select.ts:19

The LIMIT expression; null if omitted.


offset

offset: ASTNode = null

Defined in: lang-sql/src/ast/select.ts:21

The OFFSET expression; null if omitted.


orderBy

orderBy: OrderByItem[] = null

Defined in: lang-sql/src/ast/select.ts:17

Top-level ORDER BY; null if omitted.


selectSet

selectSet: SelectSet | ValuesClause

Defined in: lang-sql/src/ast/select.ts:15

The primary query body.


withQueries

withQueries: WithQuery[] = null

Defined in: lang-sql/src/ast/select.ts:23

WITH (CTE) definitions; null if no WITH clause is present.

Methods

accept()

accept<Ret, Arg>(visitor, arg?): Ret

Defined in: lang-sql/src/ast/select.ts:26

Dispatches this node to the matching method on visitor.

Type Parameters

Type Parameter
Ret
Arg

Parameters

ParameterType
visitorSQLVisitor<Ret, Arg>
arg?Arg

Returns

Ret

Implementation of

ASTNode.accept