Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow DatabaseMetaData.getColumns to describe an unset scale #1716

Merged
merged 1 commit into from Feb 25, 2020

Commits on Feb 24, 2020

  1. fix: allow DatabaseMetaData.getColumns to describe an unset scale

    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 <charlie.wheelerrobinson@gmail.com>
    crwr45 committed Feb 24, 2020
    Configuration menu
    Copy the full SHA
    48e3eae View commit details
    Browse the repository at this point in the history