Skip to main content

Class: ASTIdentifier

Defined in: packages/core/src/ast.ts:77

A (possibly qualified) identifier representing a variable, column reference, or similar name.

Remarks

Parts run from most general to most specific (e.g. [schema, table, column]).

Extended by

Implements

Constructors

Constructor

new ASTIdentifier(): ASTIdentifier

Returns

ASTIdentifier

Properties

aggregate?

optional aggregate?: AggregateCall

Defined in: packages/core/src/ast.ts:79

Set when this identifier refers to an aggregate call in a GROUP BY context.


parts

parts: (string | number | symbol)[] = []

Defined in: packages/core/src/ast.ts:82

Ordered sequence of name parts that form the qualified identifier.

Methods

[iterator]()

[iterator](): ArrayIterator<string | number | symbol>

Defined in: packages/core/src/ast.ts:84

Iterates over parts in order.

Returns

ArrayIterator<string | number | symbol>


accept()

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

Defined in: packages/core/src/ast.ts:89

Dispatches this node to the matching method on visitor.

Type Parameters

Type Parameter
Ret
Arg

Parameters

ParameterType
visitorASTVisitor<Ret, Arg>
arg?Arg

Returns

Ret

Implementation of

ASTNode.accept


equals()

equals(other): boolean

Defined in: packages/core/src/ast.ts:101

Returns true when other has the same parts in the same order.

Parameters

ParameterType
otherASTIdentifier

Returns

boolean


fromParts()

static fromParts(parts): ASTIdentifier

Defined in: packages/core/src/ast.ts:94

Creates an ASTIdentifier from a pre-built parts array.

Parameters

ParameterType
parts(string | number | symbol)[]

Returns

ASTIdentifier