Function libduckdb_sys::duckdb_double_to_decimal

source ·
pub unsafe extern "C" fn duckdb_double_to_decimal(
    val: f64,
    width: u8,
    scale: u8
) -> duckdb_decimal
Expand description

Converts a double value to a duckdb_decimal object.

If the conversion fails because the double value is too big, or the width/scale are invalid the result will be 0.

val: The double value. returns: The converted duckdb_decimal element.