Open mp911de opened 5 years ago
Here's a sketch how a PgPool
could be exposed through the R2DBC API: https://gist.github.com/mp911de/9ea13939e8fd9a6b4ef138419f085715
It does not contain all the possible cases and requires a bit of work for prepared statements, however, it outlines the general idea.
@vietj did you had a chance to have look at https://gist.github.com/mp911de/9ea13939e8fd9a6b4ef138419f085715 outlining the intended PR? If so, I could start working on a pull request. WDYT?
not yet,
I've been very busy on other things (Vert.x 3.7.0 release)
On 5 Apr 2019, at 22:21, Mark Paluch notifications@github.com wrote:
@vietj https://github.com/vietj did you had a chance to have look at https://gist.github.com/mp911de/9ea13939e8fd9a6b4ef138419f085715 https://gist.github.com/mp911de/9ea13939e8fd9a6b4ef138419f085715 outlining the intended PR? If so, I could start working on a pull request. WDYT?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/reactiverse/reactive-pg-client/issues/249#issuecomment-480410003, or mute the thread https://github.com/notifications/unsubscribe-auth/AANxiua-HNE1SrsxRFw1sglB6AxVJgzJks5vd7BcgaJpZM4bWTPn.
@mp911de nice work.
@mp911de good work, any idea on when this may be added to mybatis ?
Check out https://gist.github.com/kazuki43zoo/2ede3dcbb857d7b23d685af08b5d4ea8 and https://github.com/mybatis/mybatis-3/issues/1444. I’m not so much involved into MyBatis. However, MyBatis might need a bit of help to make R2DBC happen.
jOOQ plans to support R2DBC within the next release and it would be nice to have a wrapper for vertx. @vietj have you any "official" plans/resources to implement R2DBC support/wrapper/client or do you consider this as a community project? The biggest pain point I guess is the forced dependency to reactive streams in the API?
For the record, here's the link to the jOOQ issue: https://github.com/jOOQ/jOOQ/issues/11700. It will ship with jOOQ 3.15 in Q2 2021. So far, no show stoppers have been found
we are not actively forward looking to implement R2DBC, but I think that anyone can provide an adapter project for this.
@mp911de good work, any idea on when this may be added to mybatis ?
https://github.com/moonaries90/mybatis-r2dbc-starter I Just route about mybatis autoconfiguration. but i have no mysqlConnection to test, i used dev.miku packages. it is not very good
Another set of potential users of this integration (all via jOOQ):
While it seems that Red Hat isn't interested in moving forward with this (@vietj, why? Any background you can share on this decision? What would be needed to revert it?)
Is there any reason why @mp911de's work couldn't be published as one of these projects? https://r2dbc.io/drivers
I'm curious about this too. Thinking about whether to implement a reactive driver for https://getquill.io/ but I can't support both R2DBC and VertX simultaneously. It's hard to move forward on this when there is no standard.
R2DBC is an initiative to establish a common SPI for relational database drivers embracing reactive programming properties: Event-oriented, non-blocking, and ideally stream-oriented access to databases. R2DBC is built entirely on Reactive Streams defining a minimal API surface to be implemented by drivers without the need to re-implement common client functionality in every driver.
From an R2DBC perspective there are a couple of interfaces that could be implemented by using the following components of PgClient:
ConnectionFactory
->PgClient
andPgPool
Connection
->PgConnection
Statement
-> Utility to build/prepare a statement, eventually callingPgConnection.query(…)
orPgConnection.preparedQuery(…)
methodsResult
->PgRowSet
Row
-> (Pg)Row
What is the benefit of doing so?
Benefits:
Drawbacks:
Related ticket: #245.