Skip to main content

Module decimal

Module decimal 

Source
Expand description

Handles parsing between decimal tokens received from the lexer into native Decimal75 Proof of SQL type. Module for parsing an IntermediateDecimal into a Decimal75.

Structs§

Precision
limit-enforced precision

Enums§

DecimalError
Errors related to decimal operations.
IntermediateDecimalError
Errors related to the processing of decimal values in proof-of-sql

Functions§

try_convert_intermediate_decimal_to_scalar
Fallibly attempts to convert an IntermediateDecimal into the native proof-of-sql Scalar backing store. This function adjusts the decimal to the specified target_precision and target_scale, and validates that the adjusted decimal does not exceed the specified precision. If the conversion is successful, it returns the Scalar representation; otherwise, it returns a DecimalError indicating the type of failure (e.g., exceeding precision limits).

Type Aliases§

DecimalResult
Result type for decimal operations.