Skip to content

@sqlrooms/duckdb / isNumericDuckType

Function: isNumericDuckType()

isNumericDuckType(type): boolean

Checks if a DuckDB type string represents a numeric type. Includes INTEGER, DECIMAL, FLOAT, REAL, and DOUBLE types.

Parameters

ParameterTypeDescription
typestringThe DuckDB type string to check

Returns

boolean

True if the type is numeric, false otherwise

Example

ts
isNumericDuckType('INTEGER') // Returns true
isNumericDuckType('VARCHAR') // Returns false