BigDecimal

expect class BigDecimal

A multiplatform representation of a high-precision decimal number.

This class is used to maintain precision when working with PostgreSQL's numeric type.

  • On JVM/Desktop, it is a typealias for java.math.BigDecimal.

  • On JS, it is a wrapper around a String to avoid floating-point inaccuracies.

actual typealias BigDecimal = java.math.BigDecimal

JVM/Desktop implementation of BigDecimal using java.math.BigDecimal.

actual class BigDecimal(val value: String)

JavaScript implementation of BigDecimal.

Since JS Number is a 64-bit float, we store the value as a String to preserve full precision of PostgreSQL's numeric type.

Constructors

Link copied to clipboard
constructor(value: String)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String