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
| Parameter | Type | Default value | Description |
|---|---|---|---|
selectSet | SelectSet | ValuesClause | undefined | The primary query body. |
orderBy | OrderByItem[] | null | Top-level ORDER BY; null if omitted. |
limit | ASTNode | null | The LIMIT expression; null if omitted. |
offset | ASTNode | null | The OFFSET expression; null if omitted. |
withQueries | WithQuery[] | null | WITH (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
| Parameter | Type |
|---|---|
visitor | SQLVisitor<Ret, Arg> |
arg? | Arg |
Returns
Ret