Is there a way to re-use an existing Jasync connec...
# jasync-sql
d
Is there a way to re-use an existing Jasync connection with an r2dbc client? Something like: https://kotlinlang.slack.com/archives/C03JF82SDHA/p1673956367718769?thread_ts=1673954851.885979&cid=C03JF82SDHA
o
R2dbc has it's own pool concept. You can try to use that
d
How do I use the regular Jasync api for all the old code, and re-use that same connection for r2dbc? I need to gradually migrate to komapper... so I don't think just using r2dbc's pooling would solve the problem?
o
Doesn't sounds like something simple to implement 🤔
I wonder if it worth the hassle for migration period
Maybe by creating a pool facade that implements the r2dbc api and use jasync
If you do that publish it as jasync module
Contribute to open source 🙂
d
You mean turning the Jasync connection into one supported by R2dbc with the above
ConnectionFactory
is not currently possible?
Isn't that what the current r2dbc support does?
o
But hiw do you return the connection to the pool
d
Maybe by not creating a pool with jasync, and letting r2dbc do that with it's pool implementation?
How do you do that in the current r2dbc driver?
o
The jasync r2dbc is without pooling. R2dbc pool is separate and use it. If you can get the r2dbc pool instance and get the connection from it you can work on it maybe.
IDK how straight forward that is
Never tried
d
I guess it would be impractical to use the old code w/o a pool anyways... thanks for the suggestions though!
o
If you end up with a solution let me know. I don't know if the price of two pools during transition is high price to pay