Proposal to expose PgClient functionality through R2DBC API
See original GitHub issueR2DBC 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:
- Following an API that is well-suited for client developers without the need to entirely change how the client is supposed to work
- Participating in a growing client-ecosystem (MyBatis, draft, JDBI, Spring) with clients providing a humane API. Application developers get a choice of which client they want to use for specific use-cases.
- With the choice of clients, PgClient isn’t required to provide additional functionality such as object mapping or SQL generation. That’s up to the client.
- Choice of plug and play for a growing eco-system of drivers beyond Postgres and MySQL (e.g. H2, Microsoft SQL Server) that can be used with vert.x.
Drawbacks:
- https://xkcd.com/927/
- Dependency on Reactive Streams (could be optional, still)
- Additional complexity by maintaining two driver frontends
Related ticket: #245.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:28
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Proposal to expose PgClient functionality through R2DBC API
R2DBC is an initiative to establish a common SPI for relational database drivers embracing reactive programming properties: Event-oriented, ...
Read more >Spring Data R2DBC - Reference Documentation
R2DBC is an API specification initiative that declares a reactive API to be implemented by driver vendors to access their relational databases.
Read more >تويتر \ Alexander Ioffe (deusaquilus@) - Twitter
's sql-client and they're not interested in implementing the R2DBC spec. github.com. Proposal to expose PgClient functionality through R2DBC API · Issue ...
Read more >R2DBC specification
Offer vendor-neutral access to standard features; 2.4. ... by the underlying database or expose functionality that is not declared by the ...
Read more >Micronaut Data - GitHub Pages
Repositories with JPA Criteria API specification for Micronaut JDBC/R2DBC ... A root interface that features no methods but defines the entity type and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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?
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