https://kotlinlang.org logo
#exposed
Title
# exposed
j

Joel

08/12/2020, 3:42 PM
The JDBC layer is parsing the value to
BigDecimal
correctly but it appears that Exposed is rounding the precision to that of the original column.
Copy code
fun <T: BigDecimal?> ExpressionWithColumnType<T>.alterScale(additional: Int): ExpressionWithColumnType<T> {
    val columnType = (columnType as DecimalColumnType)
    return castTo(DecimalColumnType(columnType.precision + additional, columnType.scale + additional))
}
t

tapac

08/16/2020, 7:29 PM
I had add new
withScale
on DivideOp function. Will be avalilable on the next release. You could check test how to use it.
j

Joel

08/16/2020, 8:14 PM
🙌 perfect thank you
2 Views