Skip to main content

Class: SqlComposite

Extends

Constructors

new SqlComposite()

new SqlComposite(nodes: List<SqlNode>, binding?: SqlBinding): SqlComposite

Parameters

ParameterType
nodesList<SqlNode>
binding?SqlBinding

Returns

SqlComposite

Overrides

SqlNode.constructor

Defined in

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

Properties

nodes

readonly nodes: List<SqlNode>

Defined in

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

Accessors

binding

get binding(): undefined | SqlBinding

Returns

undefined | SqlBinding

Inherited from

SqlNode.binding

Defined in

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


identifier

get identifier(): SqlIdentifier

Returns

SqlIdentifier

Inherited from

SqlNode.identifier

Defined in

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


nullable

get nullable(): undefined | boolean

Returns

undefined | boolean

Inherited from

SqlNode.nullable

Defined in

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


readable

get readable(): boolean

Returns

boolean

Inherited from

SqlNode.readable

Defined in

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


size

get size(): number

Returns

number

Overrides

SqlNode.size

Defined in

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


type

get type(): undefined | SqlType

Returns

undefined | SqlType

Inherited from

SqlNode.type

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

Overrides

SqlNode.accept

Defined in

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


apply()

apply(ctor: Newable<SqlNode>): SqlNode

Parameters

ParameterType
ctorNewable<SqlNode>

Returns

SqlNode

Overrides

SqlNode.apply

Defined in

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


bind()

bind(binding: SqlBinding): SqlNode

Parameters

ParameterType
bindingSqlBinding

Returns

SqlNode

Overrides

SqlNode.bind

Defined in

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


compare()

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

Parameters

ParameterType
opSqlBinaryOperator
otherSqlComposite

Returns

SqlBinary

Overrides

SqlNode.compare

Defined in

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


equals()

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

Overrides

SqlNode.equals

Defined in

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


getByIndex()

getByIndex(index: number): SqlNode

Parameters

ParameterType
indexnumber

Returns

SqlNode

Defined in

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


getByName()

getByName(property: string): readonly [SqlNode, number]

Parameters

ParameterType
propertystring

Returns

readonly [SqlNode, number]

Defined in

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


hashCode()

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

Overrides

SqlNode.hashCode

Defined in

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


identify()

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

Parameters

ParameterType
aliaser(n: SqlNode) => SqlNode

Returns

SqlNode

Overrides

SqlNode.identify

Defined in

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


isAggregate()

isAggregate(): boolean

Returns

boolean

Overrides

SqlNode.isAggregate

Defined in

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


map()

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

Parameters

ParameterType
mapper(node: SqlNode) => SqlNode

Returns

SqlComposite

Overrides

SqlNode.map

Defined in

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


reduce()

reduce(): List<SqlNode>

Returns

List<SqlNode>

Overrides

SqlNode.reduce

Defined in

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


resolve()

resolve(property: string): undefined | SqlNode

Parameters

ParameterType
propertystring

Returns

undefined | SqlNode

Defined in

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


rewrite()

rewrite(rewriter: SqlRewriter): SqlNode

Parameters

ParameterType
rewriterSqlRewriter

Returns

SqlNode

Overrides

SqlNode.rewrite

Defined in

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


scope()

scope(object: SqlIdentifier): SqlComposite

Parameters

ParameterType
objectSqlIdentifier

Returns

SqlComposite

Overrides

SqlNode.scope

Defined in

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


uniquify()

uniquify(used: Set<string>, rename: (node: SqlNode) => SqlAlias): SqlComposite

Parameters

ParameterType
usedSet<string>
rename(node: SqlNode) => SqlAlias

Returns

SqlComposite

Overrides

SqlNode.uniquify

Defined in

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