eclipse-vertx / eclipse-vertx/vertx-sql-client

Proposal to expose PgClient functionality through R2DBC API

Abierto
#249 13 comentarios 30 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

help wanted
Lenguaje dominante
Java
Estrellas
912
Forks
214
Merge medio
3 d 18 h
PR fusionados (30 d)
4

Descripción

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 and PgPool
  • Connection -> PgConnection
  • Statement -> Utility to build/prepare a statement, eventually calling PgConnection.query(…) or PgConnection.preparedQuery(…) methods
  • Result -> 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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comience revisando las API existentes de PgClient, PgPool, PgConnection, PgRowSet y Row mencionadas en la propuesta y, a continuación, compárelas con las interfaces ConnectionFactory, Connection, Statement, Result y Row de R2DBC. El issue no identifica archivos, pruebas ni un alcance acordado; un siguiente paso útil es definir la superficie de la API y los criterios de aceptación antes de la implementación.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java, postgresql
Área
backend-api-design, database
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.