Skip to main content

@terascope/data-mate / teal-frame/clauses

teal-frame/clauses

Functions​

joinSQL()​

joinSQL(...parts): string

Defined in: data-mate/src/teal-frame/clauses.ts:49

Joins SQL fragments with a single space, dropping the ones that are empty.

Parameters​

ParameterType
...partsreadonly string[]

Returns​

string


selectList()​

selectList(select, columns?): object

Defined in: data-mate/src/teal-frame/clauses.ts:19

Builds a SELECT list and the column names it produces.

With a map, the keys are the column names and each expression is aliased to its key. A verbatim string cannot be turned back into column names without parsing SQL (struct_pack(...) AS "nested" and a.* are both valid), so it must come with columns. QueryAccess.restrictSQLParts returns both.

Parameters​

ParameterType
selectSelectList
columns?readonly string[]

Returns​

object

list​

list: string

names​

names: readonly string[]