ydb-java-sdk
ydb-java-sdk copied to clipboard
R2DBC driver
R2DBC (Reactive Relational Database Connectivity) is a reactive API specification for SQL databases. It provides a non-blocking and reactive way to interact with relational databases.
https://r2dbc.io
Roadmap below:
- Research and understand the database dialect
- SQL syntax
- YDB Data types map to Java Types, implement io.r2dbc.spi.Type
- other language-specific features YQL
- Study R2DBC specification. Existing dialect implementations.
- PostgreSQL R2DBC - https://github.com/pgjdbc/r2dbc-postgresql. The perfect solution from the founders of R2DBC.
- Clickhouse R2DBC - https://github.com/ClickHouse/clickhouse-java/tree/main/clickhouse-r2dbc. Community implementation. Don't support transactions, and more features.
- Design the architecture
- The driver implementation will be built using the YDB Java SDK v2.
- Connection != YDB Session. Because the connection is active until the close method is called. Connection have next state - InTransaction, OutTransaction, Close.
- Implement the core API - R2DBC SPI
- io.r2dbc.spi.ConnectionFactory
- io.r2dbc.spi.ConnectionFactoryMetadata
- io.r2dbc.spi.ConnectionFactoryProvider
- io.r2dbc.spi.Result
- io.r2dbc.spi.Row
- io.r2dbc.spi.RowMetadata
- io.r2dbc.spi.Batch
- io.r2dbc.spi.Connection
- io.r2dbc.spi.Statement
-
Testing
-
Documentation.
-
Release candidate.
Document the usage, configuration options, and any database-specific features of YDB R2DBC driver to help users and developers understand how to use it effectively.