SubSelectPattern

Description

Interface with the methods available to make a sub-SELECT query.

Methods

select( ...projections: (string | Projectable<ProjectableToken>)[] ): WherePattern

Set a list of variables and/or assignments to be retrieved by the sub-query.

Parameters

NameTypeDescription

The list of variables and/or assignments. IF no variable is provided, the behaviour will be the same as SubSelectPattern.selectAll

(string | Projectable<ProjectableToken>)[]

Returns

Object with the methods to keep constructing the sub-query.

selectDistinct( ...projections: (string | Projectable<ProjectableToken>)[] ): WherePattern

Set a list of variables and/or assignments to be retrieved by the sub-query ensuring no repetitions in the set of solutions.

Parameters

NameTypeDescription

The list of variables and/or assignments. IF no variable is provided, the behaviour will be the same as SubSelectPattern.selectAllDistinct

(string | Projectable<ProjectableToken>)[]

Returns

Object with the methods to keep constructing the sub-query.

selectReduced( ...projections: (string | Projectable<ProjectableToken>)[] ): WherePattern

Set a list of variables and/or assignments to be retrieved by the sub-query permitting eliminations of non-distinct solutions, but not ensuring a set of unique ones.

Parameters

NameTypeDescription

The list of variables and/or assignments. IF no variable is provided, the behaviour will be the same as SubSelectPattern.selectAllReduced

(string | Projectable<ProjectableToken>)[]

Returns

Object with the methods to keep constructing the sub-query.

selectAll(): WherePattern

Set that the sub-query must return all the solutions for the variables used in the where pattern matching.

Returns

Object with the methods to keep constructing the sub-query.

selectAllDistinct(): WherePattern

Set that the sub-query must return all the solutions for the variables used in the where pattern matching, ensuring there is not duplicated solutions.

Returns

Object with the methods to keep constructing the sub-query.

selectAllReduced(): WherePattern

Set that the sub-query must return all the solutions for the variables used in the where pattern matching, permitting eliminations of non-distinct solutions, but not ensuring a set of unique ones.

Returns

Object with the methods to keep constructing the sub-query.

SubSelectPattern

Description

Constant with the utils for SubSelectPattern objects.

Methods

createFrom<O extends object>( container: Container<undefined>, object: O ): O & SubSelectPattern

Factory function that allows to crete a SubSelectPattern from the object provided.

Parameters

NameTypeDescription
Container<undefined>

The related container with the data for the SubSelectPattern statement.

O

The base base from where to create the SubSelectPattern statement.

Returns

The SubSelectPattern statement created from the object provided.