Open Vai3soh opened 1 year ago
you will need to implement it like
https://github.com/AscendingCreations/AxumSession/blob/main/src/databases/postgres.rs
as we do not have SQLx Any in our list due to issues it was having before. Our Any provides a way to use any of the currently made and set databases that we currently support.
so for your case you might not need SQLx Any and instead just use Postgres and SQlite and use the separate parts with our SessionAnyPool. I have updated the Any Example to show you this. https://github.com/AscendingCreations/AxumSession/tree/main/examples/any
thanks for the example. I thought it was strange that there was a problem with creating a SessionAnyPool. It would be logical to create any_pool and pass it there.
Last question, is there any way to get an object (SessionPgPool or SessionSqlitePool) from any_pool? Depending on what we pass in connect(\<pg> or \<sqlite>)
atm there is not, but if you want you can submit a PR to add downcast_ref and downcast_mut.
Hello.
How create object SessionAnyPool if use "Pool\<Any>"?