Skip to content

Add ConnectionMetadata.getDatabaseMajorVersion() and getDatabaseMinorVersion() #204

@lukaseder

Description

@lukaseder

Feature Request

Is your feature request related to a problem? Please describe

When working with JDBC's DatabaseMetaData, I don't recall having ever used DatabaseMetaData.getDatabaseProductVersion(), which returns a string. The String is maybe useful to display in logs, or whatever, but in programmatic version specific logic, I've always appreciated the DatabaseMetaData.getDatabaseMajorVersion() and DatabaseMetaData.getDatabaseMinorVersion() methods much more. Querying them is much less error prone than relying on some string unformatting.

Describe the solution you'd like

Would be useful to have these methods also in R2DBC

Describe alternatives you've considered

Well, for now, I'll just parse the strings that the drivers offer me, or I ignore the versions.

Teachability, Documentation, Adoption, Migration Strategy

R2DBC tends to return nullable Integer types for compatibility reasons, so drivers can opt in to implementing these methods or just return null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions