Skip to main content

@terascope/data-mate / function-configs/boolean/sql-utils

function-configs/boolean/sql-utils

Functions​

columnType()​

columnType(inputConfig): FieldType

Defined in: data-mate/src/function-configs/boolean/sql-utils.ts:16

The column's declared type.

Parameters​

ParameterType
inputConfigDataTypeFieldAndChildren

Returns​

FieldType


isBooleanColumn()​

isBooleanColumn(inputConfig): boolean

Defined in: data-mate/src/function-configs/boolean/sql-utils.ts:21

Whether the column holds real booleans, which is what isBoolean asks.

Parameters​

ParameterType
inputConfigDataTypeFieldAndChildren

Returns​

boolean


isNumericColumn()​

isNumericColumn(inputConfig): boolean

Defined in: data-mate/src/function-configs/boolean/sql-utils.ts:60

Whether the column holds numbers.

Only the named numeric types count. applies declines anything else, so a Date, GeoPoint or object column keeps the UDF.

Parameters​

ParameterType
inputConfigDataTypeFieldAndChildren

Returns​

boolean


isStringColumn()​

isStringColumn(inputConfig): boolean

Defined in: data-mate/src/function-configs/boolean/sql-utils.ts:25

Parameters​

ParameterType
inputConfigDataTypeFieldAndChildren

Returns​

boolean


stringIsFalsy()​

stringIsFalsy(value): string

Defined in: data-mate/src/function-configs/boolean/sql-utils.ts:45

The falsy check for a string column.

The empty string is tested separately and without trimming, because isFalsy returns early on input === ''. So '' is falsy but ' ' is not.

Parameters​

ParameterType
valuestring

Returns​

string


stringIsTruthy()​

stringIsTruthy(value): string

Defined in: data-mate/src/function-configs/boolean/sql-utils.ts:50

The _truthy table, for a string column. true itself is a boolean and cannot appear here.

Parameters​

ParameterType
valuestring

Returns​

string