Skip to content

Commit 372f5f0

Browse files
sdeleuzemp911de
authored andcommitted
#86 - Polishing.
Convert idents to tabs. Fix Kotlin extensions formatting. Original pull request: #86.
1 parent 43a74ca commit 372f5f0

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

src/main/kotlin/org/springframework/data/r2dbc/function/DatabaseClientExtensions.kt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import kotlinx.coroutines.reactive.awaitFirstOrNull
2323
* @author Sebastien Deleuze
2424
*/
2525
suspend fun DatabaseClient.GenericExecuteSpec.await() {
26-
then().awaitFirstOrNull()
26+
then().awaitFirstOrNull()
2727
}
2828

2929
/**
@@ -32,25 +32,25 @@ suspend fun DatabaseClient.GenericExecuteSpec.await() {
3232
*
3333
* @author Sebastien Deleuze
3434
*/
35-
inline fun <reified T : Any> DatabaseClient.GenericExecuteSpec.asType(): DatabaseClient.TypedExecuteSpec<T>
36-
= `as`(T::class.java)
35+
inline fun <reified T : Any> DatabaseClient.GenericExecuteSpec.asType(): DatabaseClient.TypedExecuteSpec<T> =
36+
`as`(T::class.java)
3737

3838
/**
3939
* Extension for [DatabaseClient.GenericSelectSpec.as] providing a
4040
* `asType<Foo>()` variant.
4141
*
4242
* @author Sebastien Deleuze
4343
*/
44-
inline fun <reified T : Any> DatabaseClient.GenericSelectSpec.asType(): DatabaseClient.TypedSelectSpec<T>
45-
= `as`(T::class.java)
44+
inline fun <reified T : Any> DatabaseClient.GenericSelectSpec.asType(): DatabaseClient.TypedSelectSpec<T> =
45+
`as`(T::class.java)
4646

4747
/**
4848
* Coroutines variant of [DatabaseClient.TypedExecuteSpec.then].
4949
*
5050
* @author Sebastien Deleuze
5151
*/
5252
suspend fun <T> DatabaseClient.TypedExecuteSpec<T>.await() {
53-
then().awaitFirstOrNull()
53+
then().awaitFirstOrNull()
5454
}
5555

5656
/**
@@ -59,16 +59,16 @@ suspend fun <T> DatabaseClient.TypedExecuteSpec<T>.await() {
5959
*
6060
* @author Sebastien Deleuze
6161
*/
62-
inline fun <reified T : Any> DatabaseClient.TypedExecuteSpec<T>.asType(): DatabaseClient.TypedExecuteSpec<T>
63-
= `as`(T::class.java)
62+
inline fun <reified T : Any> DatabaseClient.TypedExecuteSpec<T>.asType(): DatabaseClient.TypedExecuteSpec<T> =
63+
`as`(T::class.java)
6464

6565
/**
6666
* Coroutines variant of [DatabaseClient.InsertSpec.then].
6767
*
6868
* @author Sebastien Deleuze
6969
*/
7070
suspend fun <T> DatabaseClient.InsertSpec<T>.await() {
71-
then().awaitFirstOrNull()
71+
then().awaitFirstOrNull()
7272
}
7373

7474
/**
@@ -77,6 +77,6 @@ suspend fun <T> DatabaseClient.InsertSpec<T>.await() {
7777
*
7878
* @author Sebastien Deleuze
7979
*/
80-
inline fun <reified T : Any> DatabaseClient.InsertIntoSpec.into(): DatabaseClient.TypedInsertSpec<T>
81-
= into(T::class.java)
80+
inline fun <reified T : Any> DatabaseClient.InsertIntoSpec.into(): DatabaseClient.TypedInsertSpec<T> =
81+
into(T::class.java)
8282

src/main/kotlin/org/springframework/data/r2dbc/function/RowsFetchSpecExtensions.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,32 @@ import kotlinx.coroutines.reactive.awaitSingle
2323
*
2424
* @author Sebastien Deleuze
2525
*/
26-
suspend fun <T> RowsFetchSpec<T>.awaitOne(): T
27-
= one().awaitSingle()
26+
suspend fun <T> RowsFetchSpec<T>.awaitOne(): T =
27+
one().awaitSingle()
2828

2929
/**
3030
* Nullable Coroutines variant of [RowsFetchSpec.one].
3131
*
3232
* @author Sebastien Deleuze
3333
*/
34-
suspend fun <T> RowsFetchSpec<T>.awaitOneOrNull(): T?
35-
= one().awaitFirstOrNull()
34+
suspend fun <T> RowsFetchSpec<T>.awaitOneOrNull(): T? =
35+
one().awaitFirstOrNull()
3636

3737
/**
3838
* Non-nullable Coroutines variant of [RowsFetchSpec.first].
3939
*
4040
* @author Sebastien Deleuze
4141
*/
42-
suspend fun <T> RowsFetchSpec<T>.awaitFirst(): T
43-
= first().awaitSingle()
42+
suspend fun <T> RowsFetchSpec<T>.awaitFirst(): T =
43+
first().awaitSingle()
4444

4545
/**
4646
* Nullable Coroutines variant of [RowsFetchSpec.first].
4747
*
4848
* @author Sebastien Deleuze
4949
*/
50-
suspend fun <T> RowsFetchSpec<T>.awaitFirstOrNull(): T?
51-
= first().awaitFirstOrNull()
50+
suspend fun <T> RowsFetchSpec<T>.awaitFirstOrNull(): T? =
51+
first().awaitFirstOrNull()
5252

5353
// TODO Coroutines variant of [RowsFetchSpec.all], depends on [kotlinx.coroutines#254](https://github.com/Kotlin/kotlinx.coroutines/issues/254).
5454
// suspend fun <T> RowsFetchSpec<T>.awaitAll() = all()...

0 commit comments

Comments
 (0)