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

Expose database/schema metadata through Connection #203

Open
j30ng opened this issue Mar 13, 2021 · 2 comments
Open

Expose database/schema metadata through Connection #203

j30ng opened this issue Mar 13, 2021 · 2 comments
Labels
status: waiting-for-votes An issue that waits for more votes until we can proceed

Comments

@j30ng
Copy link

j30ng commented Mar 13, 2021

Feature Request

Expose detailed metadata about the database through Connection interface, similar to how a JDBC Connection exposes DatabaseMetaData.

Is your feature request related to a problem? Please describe

Not really. This feature is an enhancement. Metadata about the underlying database should make dealing with DDL queries easier. A DatabaseMetaData in JDBC for example contains information such as names of all tables in the database, list of types supported by the DBMS, etc.

Not having this additional API wouldn't be much of a problem when you have to deal with only one type of DBMS, but it could be helpful when you're dealing with more than one. Especially when you're writing a library (e.g. an ORM) that uses R2DBC drivers to deal with arbitrary DBMS's. As in this case for example: JetBrains/Exposed#456 (comment)

Describe the solution you'd like

R2DBC Connection interface should include a method which exposes detailed metadata about the database obtained from the Connection.

Describe alternatives you've considered

We could decide not to add complexities to the SPI, keeping it minimal. Applications/Libraries can still generate DDL, only with some difficulties.

@mp911de
Copy link
Member

mp911de commented Mar 15, 2021

R2DBC aims to expose only driver- and server-specific metadata (driver name, database version). Adding schema capabilities basically would add only a dialect abstraction on top of drivers and we wanted to avoid that. The actual question is: How much is such a feature required to justify demand vs. effort. Having 50% of all SPI users that want such a feature is a different story from having 1% of all users asking for the feature.

@mp911de mp911de added the status: waiting-for-votes An issue that waits for more votes until we can proceed label Mar 15, 2021
@mp911de mp911de changed the title Expose database metadata through Connection Expose database/schema metadata through Connection Apr 6, 2021
@steel119
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-votes An issue that waits for more votes until we can proceed
Projects
None yet
Development

No branches or pull requests

3 participants