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

Implement From for AnyPool #2162

Open
prabirshrestha opened this issue Oct 20, 2022 · 0 comments
Open

Implement From for AnyPool #2162

prabirshrestha opened this issue Oct 20, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@prabirshrestha
Copy link

Is your feature request related to a problem? Please describe.
Most sqlx libs doesn't seem to implement AnyPool but rather SqlitePool or PgPool. This makes my code which use AnyPool incompatible with the external libraries.

Describe the solution you'd like
From is implemented for AnyConnection. Is it possible to do the same for AnyPool? Would also be good to have try_into() so AnyPool can be can be converted to SqlitePool, PgPool or error out.

Describe alternatives you've considered
Need to use Pool so Connection alone is not enough.

Additional context
Example use case: ZeroAssumptions/aide-de-camp#11, casbin-rs/sqlx-adapter#77. It wouldn't scale to ask every libraries to support AnyPool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant