Skip to main content

Class: abstract SqlNode

Extended by

Implements

  • ValueObject

Constructors

new SqlNode()

protected new SqlNode(binding?: SqlBinding): SqlNode

Parameters

ParameterType
binding?SqlBinding

Returns

SqlNode

Defined in

packages/verse-core/src/db/sql.ts:98

Accessors

binding

get binding(): undefined | SqlBinding

Returns

undefined | SqlBinding

Defined in

packages/verse-core/src/db/sql.ts:102


identifier

get identifier(): SqlIdentifier

Returns

SqlIdentifier

Defined in

packages/verse-core/src/db/sql.ts:127


nullable

get nullable(): undefined | boolean

Returns

undefined | boolean

Defined in

packages/verse-core/src/db/sql.ts:110


readable

get readable(): boolean

Returns

boolean

Defined in

packages/verse-core/src/db/sql.ts:114


size

get size(): number

Returns

number

Defined in

packages/verse-core/src/db/sql.ts:155


type

get type(): undefined | SqlType

Returns

undefined | SqlType

Defined in

packages/verse-core/src/db/sql.ts:106

Methods

accept()

accept<T, S>(visitor: SqlVisitor<T, unknown>, state?: S): T

Type Parameters

Type ParameterDefault type
T-
Sunknown

Parameters

ParameterType
visitorSqlVisitor<T, unknown>
state?S

Returns

T

Defined in

packages/verse-core/src/db/sql.ts:164


apply()

apply(ctor: Newable<SqlNode>): SqlNode

Parameters

ParameterType
ctorNewable<SqlNode>

Returns

SqlNode

Defined in

packages/verse-core/src/db/sql.ts:147


bind()

bind(binding: SqlBinding): SqlNode

Parameters

ParameterType
bindingSqlBinding

Returns

SqlNode

Defined in

packages/verse-core/src/db/sql.ts:119


compare()

compare(op: SqlBinaryOperator, other: SqlNode): SqlBinary

Parameters

ParameterType
opSqlBinaryOperator
otherSqlNode

Returns

SqlBinary

Defined in

packages/verse-core/src/db/sql.ts:151


equals()

abstract equals(other: unknown): boolean

True if this and the other Collection have value equality, as defined by Immutable.is().

Note: This is equivalent to Immutable.is(this, other), but provided to allow for chained expressions.

Parameters

ParameterType
otherunknown

Returns

boolean

Implementation of

ValueObject.equals

Defined in

packages/verse-core/src/db/sql.ts:173


hashCode()

abstract hashCode(): number

Computes and returns the hashed identity for this Collection.

The hashCode of a Collection is used to determine potential equality, and is used when adding this to a Set or as a key in a Map, enabling lookup via a different instance.

const { List, Set } = require('immutable');
const a = List([ 1, 2, 3 ]);
const b = List([ 1, 2, 3 ]);
assert.notStrictEqual(a, b); // different instances
const set = Set([ a ]);
assert.equal(set.has(b), true);

Note: hashCode() MUST return a Uint32 number. The easiest way to guarantee this is to return myHash | 0 from a custom implementation.

If two values have the same hashCode, they are not guaranteed to be equal. If two values have different hashCodes, they must not be equal.

Note: hashCode() is not guaranteed to always be called before equals(). Most but not all Immutable.js collections use hash codes to organize their internal data structures, while all Immutable.js collections use equality during lookups.

Returns

number

Implementation of

ValueObject.hashCode

Defined in

packages/verse-core/src/db/sql.ts:175


identify()

identify(_: (n: SqlNode) => SqlNode): SqlNode

Parameters

ParameterType
_(n: SqlNode) => SqlNode

Returns

SqlNode

Defined in

packages/verse-core/src/db/sql.ts:131


isAggregate()

isAggregate(): boolean

Returns

boolean

Defined in

packages/verse-core/src/db/sql.ts:159


map()

map(mapper: (node: SqlNode) => SqlNode): SqlNode

Parameters

ParameterType
mapper(node: SqlNode) => SqlNode

Returns

SqlNode

Defined in

packages/verse-core/src/db/sql.ts:143


reduce()

reduce(): List<SqlNode>

Returns

List<SqlNode>

Defined in

packages/verse-core/src/db/sql.ts:139


rewrite()

rewrite(rewriter: SqlRewriter): SqlNode

Parameters

ParameterType
rewriterSqlRewriter

Returns

SqlNode

Defined in

packages/verse-core/src/db/sql.ts:169


scope()

scope(_: SqlIdentifier): SqlNode

Parameters

ParameterType
_SqlIdentifier

Returns

SqlNode

Defined in

packages/verse-core/src/db/sql.ts:123


uniquify()

uniquify(_: Set<string>, __: (node: SqlNode) => SqlAlias): SqlNode

Parameters

ParameterType
_Set<string>
__(node: SqlNode) => SqlAlias

Returns

SqlNode

Defined in

packages/verse-core/src/db/sql.ts:135