Skip to main content

Class: ASTCast

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

SQL CAST(expr AS type) expression.

Implements​

Constructors​

Constructor​

new ASTCast(expr, type, isArray?): ASTCast

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

Parameters​

ParameterTypeDefault valueDescription
exprASTNodeundefinedThe expression being cast.
typeASTIdentifierundefinedThe target data type.
isArraybooleanfalsetrue when the cast target is an array type (type[]).

Returns​

ASTCast

Properties​

expr​

expr: ASTNode

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

The expression being cast.


isArray​

isArray: boolean = false

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

true when the cast target is an array type (type[]).


type​

type: ASTIdentifier

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

The target data type.

Methods​

accept()​

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

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

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