// TODO convertScale for Timestamps: may throw an exception?
throw DbException.getInvalidValueException("" + targetScale, "scale");
}
int nanos = value.getNanos();
BigDecimal bd = BigDecimal.valueOf(nanos);
bd = bd.movePointLeft(9);
bd = MathUtils.setScale(bd, targetScale);
bd = bd.movePointRight(9);
int n2 = bd.intValue();
if (n2 == nanos) {
return this;