An open API service indexing awesome lists of open source software.

https://github.com/r2dbc/r2dbc-client

Reactive Relational Database Connectivity
https://github.com/r2dbc/r2dbc-client

api database java reactive reactive-streams reactor

Last synced: 9 months ago
JSON representation

Reactive Relational Database Connectivity

Awesome Lists containing this project

README

          

This project is no longer being actively maintained.

# Reactive Relational Database Connectivity Client (Archived)
This project is an exploration of what a Java API for relational database access with [Reactive Streams][rs] might look like. It uses [Project Reactor][pr]. It uses [Jdbi][jd] as an inspiration.

[jd]: http://jdbi.org
[pr]: https://projectreactor.io
[rs]: https://www.reactive-streams.org

## Examples
A quick example of configuration and execution would look like:

```java
PostgresqlConnectionConfiguration configuration = PostgresqlConnectionConfiguration.builder()
.host("")
.database("")
.username("")
.password("")
.build();

R2dbc r2dbc = new R2dbc(new PostgresqlConnectionFactory(configuration));

r2dbc.inTransaction(handle ->
handle.execute("INSERT INTO test VALUES ($1)", 100))

.thenMany(r2dbc.inTransaction(handle ->
handle.select("SELECT value FROM test")
.mapResult(result -> result.map((row, rowMetadata) -> row.get("value", Integer.class)))))

.subscribe(System.out::println);
```

## Maven
Both milestone and snapshot artifacts (library, source, and javadoc) can be found in Maven repositories.

```xml

io.r2dbc
r2dbc-client
0.8.0.RC1

```

Artifacts can bound found at the following repositories.

### Repositories
```xml

spring-snapshots
Spring Snapshots
https://repo.spring.io/snapshot

true

```

```xml

spring-milestones
Spring Milestones
https://repo.spring.io/milestone

false

```

## License
This project is released under version 2.0 of the [Apache License][l].

[l]: https://www.apache.org/licenses/LICENSE-2.0