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
| Parameter | Type | Default value | Description |
|---|---|---|---|
items | ASTNode[] | undefined | The projection list (the expressions after SELECT). |
from | ASTTableAlias | SQLIdentifier | JoinClause | null | The primary table source; null for a SELECT with no FROM. |
where | ASTNode | null | WHERE predicate; null if omitted. |
groupBy | GroupByClause | null | GROUP BY clause; null if omitted. |
having | ASTNode | null | HAVING predicate; null if omitted. |
distinct | boolean | ASTNode[] | false | false for no DISTINCT, true for DISTINCT, or an expression list for DISTINCT ON (...). |
windows | Record<string, WindowSpec> | null | Named 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?
optionalsetOp?: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
| Parameter | Type |
|---|---|
visitor | SQLVisitor<Ret, Arg> |
arg? | Arg |
Returns
Ret