Skip to main content

Module cast

Module cast 

Source

Structs§

CastFunction
SQL CAST(expr AS type).

Enums§

CastTarget
The set of target types CAST supports. We deliberately collapse SQL’s large “zoo” of character/numeric types down to the handful of types our engine actually stores in DataValue. This keeps CAST close to DuckDB’s observable behaviour without dragging in fixed-width CHAR, DECIMAL precision, etc.

Functions§

cast_value
Coerce a value to the requested target type. Errors describe why a value could not be represented; callers decide whether that error is fatal (CAST) or should become NULL (TRY_CAST). NULL always casts to NULL.