Skip to main content

Class: ASTCase

Defined in: lang-sql/src/ast/expression.ts:210

SQL CASE expression.

Implements

Constructors

Constructor

new ASTCase(expr, whenThen, elseExpr): ASTCase

Defined in: lang-sql/src/ast/expression.ts:211

Parameters

ParameterTypeDescription
exprASTNodeThe value compared against WHEN conditions (simple CASE); null for a searched CASE.
whenThen[ASTNode, ASTNode][]Ordered list of [condition, result] pairs.
elseExprASTNodeThe ELSE expression; null when no ELSE clause is present.

Returns

ASTCase

Properties

elseExpr

elseExpr: ASTNode

Defined in: lang-sql/src/ast/expression.ts:217

The ELSE expression; null when no ELSE clause is present.


expr

expr: ASTNode

Defined in: lang-sql/src/ast/expression.ts:213

The value compared against WHEN conditions (simple CASE); null for a searched CASE.


whenThen

whenThen: [ASTNode, ASTNode][]

Defined in: lang-sql/src/ast/expression.ts:215

Ordered list of [condition, result] pairs.

Methods

accept()

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

Defined in: lang-sql/src/ast/expression.ts:220

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