-
Notifications
You must be signed in to change notification settings - Fork 200
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
SqlConnectionOptions.fromUri() #767
Comments
I like the idea, but in order for that to work the generic |
OK, I see. |
what kind of URI are we talking there ?
|
@vietj Right, the same URI format. I'm saying I would like a single method that automatically distinguishes the driver type based on the format of that URL. |
do other databases have similar URI ?
…On Wed, Oct 21, 2020 at 1:05 PM Gavin King ***@***.***> wrote:
@vietj <https://github.com/vietj> Right, the same URI format. I'm saying
I would like a single method that automatically distinguishes the driver
type based on the format of that URL.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#767 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABXDCRMLW3ETONKWENBLYTSL26AVANCNFSM4RQU25PQ>
.
|
Yup, at least the ones you support, and Vert.x already has methods for handling them. :-) |
(See |
I don't know about databases but the official registry (IANA) https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml does have entries for redis and mongodb for example. The new redis client refers to it and the url format of the connection string follows the iana spec. |
I don't mind an SPI, however there is already an SPI and I would like to avoid the proliferation of SPI for a feature that seem to be the same, i.e we should reuse the same SPI or have a way to reduce one SPI usage to the other. |
Something similar like |
indeed good catch |
Currently we have the useful method
Pool.pool()
which automatically selects the driver based on the concrete class of the givenSqlConnectOptions
.But I would like a method
SqlConnectionOptions.fromUri()
, which automatically constructs the right type ofSqlConnectOptions
based on the scheme of the given URI.(It would delegate to
PgConnectOptions.fromUri()
, etc.)The text was updated successfully, but these errors were encountered: