Skip to main content

Class: SelectSet

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

One SELECT body, covering its projection, source, filter, grouping, and window definitions.

Implements

Constructors

Constructor

new SelectSet(items, from?, where?, groupBy?, having?, distinct?, windows?): SelectSet

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

Parameters

ParameterTypeDefault valueDescription
itemsASTNode[]undefinedThe projection list (the expressions after SELECT).
fromASTTableAlias | SQLIdentifier | JoinClausenullThe primary table source; null for a SELECT with no FROM.
whereASTNodenullWHERE predicate; null if omitted.
groupByGroupByClausenullGROUP BY clause; null if omitted.
havingASTNodenullHAVING predicate; null if omitted.
distinctboolean | ASTNode[]falsefalse for no DISTINCT, true for DISTINCT, or an expression list for DISTINCT ON (...).
windowsRecord<string, WindowSpec>nullNamed window definitions from the WINDOW clause; null if none are defined.

Returns

SelectSet

Properties

distinct

distinct: boolean | ASTNode[] = false

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

false for no DISTINCT, true for DISTINCT, or an expression list for DISTINCT ON (...).


from

from: ASTTableAlias | SQLIdentifier | JoinClause = null

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

The primary table source; null for a SELECT with no FROM.


groupBy

groupBy: GroupByClause = null

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

GROUP BY clause; null if omitted.


having

having: ASTNode = null

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

HAVING predicate; null if omitted.


items

items: ASTNode[]

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

The projection list (the expressions after SELECT).


setOp?

optional setOp?: SelectSetOp

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

Linked UNION/INTERSECT/EXCEPT operation following this set; undefined if this is the last set.


where

where: ASTNode = null

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

WHERE predicate; null if omitted.


windows

windows: Record<string, WindowSpec> = null

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

Named window definitions from the WINDOW clause; null if none are defined.

Methods

accept()

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

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

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