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

cannot differientate between sqlx::postgres::PgPool and sqlx_core::postgres::PgPool in from_client #34

Open
TeoOrt opened this issue Sep 8, 2023 · 1 comment

Comments

@TeoOrt
Copy link

TeoOrt commented Sep 8, 2023

The issue im having is that I am trying to pass in a Pool object to the PostgresSessionStore::from_client(pool) and it gives me an issue of mismatched types Pool and Pool I am using the latest version of all, slqx = 0.7.1 and async-sqlx-session = 0.4.0 if you have any fixes let me know

@rogusdev
Copy link

Can you just specify the correct Pool type to use in your code? I.e. use lib1::Pool as Pool1 and use lib2::Pool as Pool2 and make sure you are passing the correct Pool1 or Pool2 into this function.

Note that per the docs: https://docs.rs/async-sqlx-session/latest/async_sqlx_session/struct.PostgresSessionStore.html#method.from_client the correct Pool object is sqlx::PgPool which is itself just an alias for a generic type per https://docs.rs/sqlx/latest/sqlx/type.PgPool.html

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

No branches or pull requests

2 participants