@ -486,6 +486,14 @@ class DefaultDatabaseClient implements DatabaseClient, ConnectionAccessor {
@@ -486,6 +486,14 @@ class DefaultDatabaseClient implements DatabaseClient, ConnectionAccessor {
return createTypedExecuteSpec ( this . byIndex , this . byName , this . sqlSupplier , resultType ) ;
}
@Override
public < R > FetchSpec < R > map ( Function < Row , R > mappingFunction ) {
Assert . notNull ( mappingFunction , "Mapping function must not be null!" ) ;
return exchange ( this . sqlSupplier , ( row , rowMetadata ) - > mappingFunction . apply ( row ) ) ;
}
@Override
public < R > FetchSpec < R > map ( BiFunction < Row , RowMetadata , R > mappingFunction ) {
@ -571,6 +579,14 @@ class DefaultDatabaseClient implements DatabaseClient, ConnectionAccessor {
@@ -571,6 +579,14 @@ class DefaultDatabaseClient implements DatabaseClient, ConnectionAccessor {
return createTypedExecuteSpec ( this . byIndex , this . byName , this . sqlSupplier , resultType ) ;
}
@Override
public < R > FetchSpec < R > map ( Function < Row , R > mappingFunction ) {
Assert . notNull ( mappingFunction , "Mapping function must not be null!" ) ;
return exchange ( this . sqlSupplier , ( row , rowMetadata ) - > mappingFunction . apply ( row ) ) ;
}
@Override
public < R > FetchSpec < R > map ( BiFunction < Row , RowMetadata , R > mappingFunction ) {
@ -727,6 +743,14 @@ class DefaultDatabaseClient implements DatabaseClient, ConnectionAccessor {
@@ -727,6 +743,14 @@ class DefaultDatabaseClient implements DatabaseClient, ConnectionAccessor {
resultType , dataAccessStrategy . getRowMapper ( resultType ) ) ;
}
@Override
public < R > FetchSpec < R > map ( Function < Row , R > mappingFunction ) {
Assert . notNull ( mappingFunction , "Mapping function must not be null!" ) ;
return exchange ( ( row , rowMetadata ) - > mappingFunction . apply ( row ) ) ;
}
@Override
public < R > FetchSpec < R > map ( BiFunction < Row , RowMetadata , R > mappingFunction ) {
@ -816,6 +840,14 @@ class DefaultDatabaseClient implements DatabaseClient, ConnectionAccessor {
@@ -816,6 +840,14 @@ class DefaultDatabaseClient implements DatabaseClient, ConnectionAccessor {
return exchange ( dataAccessStrategy . getRowMapper ( resultType ) ) ;
}
@Override
public < R > FetchSpec < R > map ( Function < Row , R > mappingFunction ) {
Assert . notNull ( mappingFunction , "Mapping function must not be null!" ) ;
return exchange ( ( row , rowMetadata ) - > mappingFunction . apply ( row ) ) ;
}
@Override
public < R > FetchSpec < R > map ( BiFunction < Row , RowMetadata , R > mappingFunction ) {
@ -935,6 +967,14 @@ class DefaultDatabaseClient implements DatabaseClient, ConnectionAccessor {
@@ -935,6 +967,14 @@ class DefaultDatabaseClient implements DatabaseClient, ConnectionAccessor {
return new DefaultGenericInsertSpec < > ( this . table , byName , this . mappingFunction ) ;
}
@Override
public < R > FetchSpec < R > map ( Function < Row , R > mappingFunction ) {
Assert . notNull ( mappingFunction , "Mapping function must not be null!" ) ;
return exchange ( ( row , rowMetadata ) - > mappingFunction . apply ( row ) ) ;
}
@Override
public < R > FetchSpec < R > map ( BiFunction < Row , RowMetadata , R > mappingFunction ) {
@ -1017,6 +1057,14 @@ class DefaultDatabaseClient implements DatabaseClient, ConnectionAccessor {
@@ -1017,6 +1057,14 @@ class DefaultDatabaseClient implements DatabaseClient, ConnectionAccessor {
return new DefaultTypedInsertSpec < > ( this . typeToInsert , this . table , objectToInsert , this . mappingFunction ) ;
}
@Override
public < MR > FetchSpec < MR > map ( Function < Row , MR > mappingFunction ) {
Assert . notNull ( mappingFunction , "Mapping function must not be null!" ) ;
return exchange ( ( row , rowMetadata ) - > mappingFunction . apply ( row ) ) ;
}
@Override
public < MR > FetchSpec < MR > map ( BiFunction < Row , RowMetadata , MR > mappingFunction ) {