@@ -64,7 +64,9 @@ public interface DatabaseClient {
64
64
// Static, factory methods
65
65
66
66
/**
67
- * A variant of {@link #create()} that accepts a {@link io.r2dbc.spi.ConnectionFactory}
67
+ * Creates a {@code DatabaseClient} that will use the provided {@link io.r2dbc.spi.ConnectionFactory}.
68
+ * @param factory The {@code ConnectionFactory} to use for obtaining connections.
69
+ * @return a new {@code DatabaseClient}. Guaranteed to be not {@code null}.
68
70
*/
69
71
static DatabaseClient create (ConnectionFactory factory ) {
70
72
return new DefaultDatabaseClientBuilder ().connectionFactory (factory ).build ();
@@ -161,7 +163,7 @@ interface GenericExecuteSpec extends BindSpec<GenericExecuteSpec> {
161
163
*
162
164
* @param mappingFunction must not be {@literal null}.
163
165
* @param <R> result type.
164
- * @return
166
+ * @return a {@link FetchSpec} for configuration what to fetch. Guaranteed to be not {@code null}.
165
167
*/
166
168
<R > FetchSpec <R > map (BiFunction <Row , RowMetadata , R > mappingFunction );
167
169
@@ -197,7 +199,7 @@ interface TypedExecuteSpec<T> extends BindSpec<TypedExecuteSpec<T>> {
197
199
*
198
200
* @param mappingFunction must not be {@literal null}.
199
201
* @param <R> result type.
200
- * @return
202
+ * @return a {@link FetchSpec} for configuration what to fetch. Guaranteed to be not {@code null}.
201
203
*/
202
204
<R > FetchSpec <R > map (BiFunction <Row , RowMetadata , R > mappingFunction );
203
205
@@ -223,15 +225,15 @@ interface SelectFromSpec {
223
225
* Specify the source {@literal table} to select from.
224
226
*
225
227
* @param table must not be {@literal null} or empty.
226
- * @return
228
+ * @return a {@link GenericSelectSpec} for further configuration of the select. Guaranteed to be not {@code null}.
227
229
*/
228
230
GenericSelectSpec from (String table );
229
231
230
232
/**
231
233
* Specify the source table to select from to using the {@link Class entity class}.
232
234
*
233
235
* @param table must not be {@literal null}.
234
- * @return
236
+ * @return a {@link TypedSelectSpec} for further configuration of the select. Guaranteed to be not {@code null}.
235
237
*/
236
238
<T > TypedSelectSpec <T > from (Class <T > table );
237
239
}
@@ -245,15 +247,15 @@ interface InsertIntoSpec {
245
247
* Specify the target {@literal table} to insert into.
246
248
*
247
249
* @param table must not be {@literal null} or empty.
248
- * @return
250
+ * @return a {@link GenericInsertSpec} for further configuration of the insert. Guaranteed to be not {@code null}.
249
251
*/
250
252
GenericInsertSpec <Map <String , Object >> into (String table );
251
253
252
254
/**
253
255
* Specify the target table to insert to using the {@link Class entity class}.
254
256
*
255
257
* @param table must not be {@literal null}.
256
- * @return
258
+ * @return a {@link TypedInsertSpec} for further configuration of the insert. Guaranteed to be not {@code null}.
257
259
*/
258
260
<T > TypedInsertSpec <T > into (Class <T > table );
259
261
}
@@ -277,7 +279,7 @@ interface GenericSelectSpec extends SelectSpec<GenericSelectSpec> {
277
279
*
278
280
* @param mappingFunction must not be {@literal null}.
279
281
* @param <R> result type.
280
- * @return
282
+ * @return a {@link FetchSpec} for configuration what to fetch. Guaranteed to be not {@code null}.
281
283
*/
282
284
<R > FetchSpec <R > map (BiFunction <Row , RowMetadata , R > mappingFunction );
283
285
@@ -306,7 +308,7 @@ interface TypedSelectSpec<T> extends SelectSpec<TypedSelectSpec<T>> {
306
308
*
307
309
* @param mappingFunction must not be {@literal null}.
308
310
* @param <R> result type.
309
- * @return
311
+ * @return a {@link FetchSpec} for configuration what to fetch. Guaranteed to be not {@code null}.
310
312
*/
311
313
<R > FetchSpec <R > map (BiFunction <Row , RowMetadata , R > mappingFunction );
312
314
@@ -375,25 +377,25 @@ interface TypedInsertSpec<T> {
375
377
/**
376
378
* Insert the given {@code objectToInsert}.
377
379
*
378
- * @param objectToInsert
379
- * @return
380
+ * @param objectToInsert the object of which the attributes will provide the values for the insert. Must not be {@code null}.
381
+ * @return a {@link InsertSpec} for further configuration of the insert. Guaranteed to be not {@code null}.
380
382
*/
381
383
InsertSpec <Map <String , Object >> using (T objectToInsert );
382
384
383
385
/**
384
386
* Use the given {@code tableName} as insert target.
385
387
*
386
388
* @param tableName must not be {@literal null} or empty.
387
- * @return
389
+ * @return a {@link TypedInsertSpec} for further configuration of the insert. Guaranteed to be not {@code null}.
388
390
*/
389
391
TypedInsertSpec <T > table (String tableName );
390
392
391
393
/**
392
394
* Insert the given {@link Publisher} to insert one or more objects. Inserts only a single object when calling
393
395
* {@link FetchSpec#one()} or {@link FetchSpec#first()}.
394
396
*
395
- * @param objectToInsert
396
- * @return
397
+ * @param objectToInsert a publisher providing the objects of which the attributes will provide the values for the insert. Must not be {@code null}.
398
+ * @return a {@link InsertSpec} for further configuration of the insert. Guaranteed to be not {@code null}.
397
399
* @see InsertSpec#fetch()
398
400
*/
399
401
InsertSpec <Map <String , Object >> using (Publisher <T > objectToInsert );
@@ -411,7 +413,7 @@ interface InsertSpec<T> {
411
413
*
412
414
* @param mappingFunction must not be {@literal null}.
413
415
* @param <R> result type.
414
- * @return
416
+ * @return a {@link FetchSpec} for configuration what to fetch. Guaranteed to be not {@code null}.
415
417
*/
416
418
<R > FetchSpec <R > map (BiFunction <Row , RowMetadata , R > mappingFunction );
417
419
@@ -436,15 +438,15 @@ interface BindSpec<S extends BindSpec<S>> {
436
438
/**
437
439
* Bind a non-{@literal null} value to a parameter identified by its {@code index}.
438
440
*
439
- * @param index
440
- * @param value must not be {@literal null}.
441
+ * @param index zero based index to bind the parameter to.
442
+ * @param value to bind. Must not be {@literal null}.
441
443
*/
442
444
S bind (int index , Object value );
443
445
444
446
/**
445
447
* Bind a {@literal null} value to a parameter identified by its {@code index}.
446
448
*
447
- * @param index
449
+ * @param index zero based index to bind the parameter to.
448
450
* @param type must not be {@literal null}.
449
451
*/
450
452
S bindNull (int index , Class <?> type );
0 commit comments