Skip to main content

decimal_cents

Function decimal_cents 

Source
pub fn decimal_cents(value: &Value) -> Result<i64, DatabaseError>
Expand description

Parses a bounded two-place decimal without floating-point arithmetic. JSON numbers are accepted at the input boundary; storage and reads use canonical strings so adapters cannot silently round monetary values.