#140 - Accept simple mapping function for Row in DatabaseClient.

We now accept a Function<Row, T> in DatabaseClient's map(…) operator to simplify mapping by not requiring RowMetadata.
This commit is contained in:
Mark Paluch
2019-07-12 15:38:59 +02:00
parent 1d42866231
commit 776044de2b
3 changed files with 96 additions and 2 deletions

View File

@@ -332,7 +332,7 @@ public abstract class AbstractDatabaseClientIntegrationTests extends R2dbcIntegr
databaseClient.select().from("legoset") //
.project("id", "name", "manual") //
.orderBy(Sort.by("id")) //
.map((r, md) -> r.get("id", Integer.class)) //
.map((r) -> r.get("id", Integer.class)) //
.all() //
.as(StepVerifier::create) //
.expectNext(42055) //
@@ -374,7 +374,7 @@ public abstract class AbstractDatabaseClientIntegrationTests extends R2dbcIntegr
.project("id", "name", "manual") //
.orderBy(Sort.by("id")) //
.matching(where("id").greaterThanOrEquals(42055).and("id").lessThanOrEquals(42055))
.map((r, md) -> r.get("id", Integer.class)) //
.map((r) -> r.get("id", Integer.class)) //
.all() //
.as(StepVerifier::create) //
.expectNext(42055) //