-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add support of multiple databases #51
Comments
It's possible using Subtypes in ZIO Prelude in Scala 2.13, but not yet in Scala 3 due to a compiler issue or something AFAIK. As a workaround I manually declare different subtypes of class DatabaseOne(underlying: Database) extends Database {
override def transaction[R, E, A](...) = ???
// other necessary overrides ...
} |
I can definitely see how such a feature would be useful. A simple way to make it easier would be for Tranzactio to provide directly a I could also provide a |
I created a PR for this use case. What do you think? I'm not fan of the name |
I worked with the tranzactio a long time ago, and I remember an issue I could not overcome: I had more than one database and I wanted to combine two ZIOs that required two connections to two different databases and then do
transactionOrDie
for each of the connection separately. This is just a prototype, but I wanted something like this:I don't think something like this is doable in scala 2.13, but maybe in scala 3 is possible.
The text was updated successfully, but these errors were encountered: