This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow DatabaseMetaData.getColumns to describe an unset scale (#1716
) getColumns returns a 0 for the scale of a Decimal or Numeric column when the scale is 0, and when the scale is null. The caller can then not differentiate between a 0 or a null without another query. This change replaces the 0 in the ResultSet for scale with a null when describing an unscaled Decimal or Numeric column. getInt will still convert the null to a 0, but the caller can then use wasNull() to find out if the underlying value was 0 or null. This addresses Issue 1712. It is a breaking change, but if the correct getter (getInt) is used for the column, there is no difference. Other getters may behave differently. Signed-off-by: crwr45 <email@example.com>
- Loading branch information
Showing 2 changed files with 61 additions and 1 deletion.