Skip to content

Commit 32c6122

Browse files
committed
fix: doc errors.
1 parent 401b89f commit 32c6122

File tree

4 files changed

+77
-91
lines changed

4 files changed

+77
-91
lines changed

google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ CommitResponse writeAtLeastOnceWithOptions(
368368

369369
/**
370370
* Returns a transaction manager which allows manual management of transaction lifecycle. This API
371-
* is meant for advanced users. Most users should instead use the {@link #readWriteTransaction()}
372-
* API instead.
371+
* is meant for advanced users. Most users should instead use the {@link
372+
* #readWriteTransaction(TransactionOption...)} API instead.
373373
*
374374
* <p>Example of using {@link TransactionManager}.
375375
*
@@ -449,7 +449,7 @@ CommitResponse writeAtLeastOnceWithOptions(
449449
/**
450450
* Returns an asynchronous transaction manager which allows manual management of transaction
451451
* lifecycle. This API is meant for advanced users. Most users should instead use the {@link
452-
* #runAsync()} API instead.
452+
* #runAsync(TransactionOption...)} API instead.
453453
*
454454
* <p>Example of using {@link AsyncTransactionManager}.
455455
*
@@ -514,12 +514,13 @@ CommitResponse writeAtLeastOnceWithOptions(
514514
*
515515
* <p>Partitioned DML updates are used to execute a single DML statement with a different
516516
* execution strategy that provides different, and often better, scalability properties for large,
517-
* table-wide operations than DML in a {@link #readWriteTransaction()} transaction. Smaller scoped
518-
* statements, such as an OLTP workload, should prefer using {@link
519-
* TransactionContext#executeUpdate(Statement)} with {@link #readWriteTransaction()}.
517+
* table-wide operations than DML in a {@link #readWriteTransaction(TransactionOption...)}
518+
* transaction. Smaller scoped statements, such as an OLTP workload, should prefer using {@link
519+
* TransactionContext#executeUpdate(Statement,UpdateOption...)} with {@link
520+
* #readWriteTransaction(TransactionOption...)}.
520521
*
521522
* <p>That said, Partitioned DML is not a drop-in replacement for standard DML used in {@link
522-
* #readWriteTransaction()}.
523+
* #readWriteTransaction(TransactionOption...)}.
523524
*
524525
* <ul>
525526
* <li>The DML statement must be fully-partitionable. Specifically, the statement must be

google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java

Lines changed: 47 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@
5353
public interface StructReader {
5454
/**
5555
* @return the type of the underlying data. This will always be a {@code STRUCT} type, with fields
56-
* corresponding to the data's columns. For the result of a read or query, this will always match
57-
* the columns passed to the {@code read()} call or named in the query text, in order.
56+
* corresponding to the data's columns. For the result of a read or query, this will always
57+
* match the columns passed to the {@code read()} call or named in the query text, in order.
5858
*/
5959
Type getType();
6060

6161
/**
6262
* @return the number of columns in the underlying data. This includes any columns with {@code
63-
* NULL} values.
63+
* NULL} values.
6464
*/
6565
int getColumnCount();
6666

@@ -157,7 +157,6 @@ public interface StructReader {
157157
String getString(String columnName);
158158

159159
/**
160-
*
161160
* @param columnIndex index of the column
162161
* @return the value of a non-{@code NULL} column with type {@link Type#json()}.
163162
*/
@@ -174,7 +173,6 @@ default String getJson(String columnName) {
174173
}
175174

176175
/**
177-
*
178176
* @param columnIndex index of the column
179177
* @return the value of a non-{@code NULL} column with type {@link Type#pgJsonb()}.
180178
*/
@@ -245,7 +243,6 @@ default Value getValue(String columnName) {
245243
/**
246244
* @param columnIndex index of the column
247245
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}.
248-
*
249246
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
250247
* may contain {@code NULL} values, use {@link #getBooleanList(int)} instead.
251248
*/
@@ -254,7 +251,6 @@ default Value getValue(String columnName) {
254251
/**
255252
* @param columnName name of the column
256253
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}.
257-
*
258254
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
259255
* may contain {@code NULL} values, use {@link #getBooleanList(String)} instead.
260256
*/
@@ -263,23 +259,22 @@ default Value getValue(String columnName) {
263259
/**
264260
* @param columnIndex index of the column
265261
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The
266-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
267-
* each element in the list multiple times.
262+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
263+
* access each element in the list multiple times.
268264
*/
269265
List<Boolean> getBooleanList(int columnIndex);
270266

271267
/**
272268
* @param columnName name of the column
273269
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The
274-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
275-
* each element in the list multiple times.
270+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
271+
* access each element in the list multiple times.
276272
*/
277273
List<Boolean> getBooleanList(String columnName);
278274

279275
/**
280276
* @param columnIndex index of the column
281277
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}.
282-
*
283278
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
284279
* may contain {@code NULL} values, use {@link #getLongList(int)} instead.
285280
*/
@@ -288,7 +283,6 @@ default Value getValue(String columnName) {
288283
/**
289284
* @param columnName name of the column
290285
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}.
291-
*
292286
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
293287
* may contain {@code NULL} values, use {@link #getLongList(String)} instead.
294288
*/
@@ -297,23 +291,22 @@ default Value getValue(String columnName) {
297291
/**
298292
* @param columnIndex index of the column
299293
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The
300-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
301-
* each element in the list multiple times.
294+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
295+
* access each element in the list multiple times.
302296
*/
303297
List<Long> getLongList(int columnIndex);
304298

305299
/**
306300
* @param columnName
307301
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The
308-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
309-
* each element in the list multiple times.
302+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
303+
* access each element in the list multiple times.
310304
*/
311305
List<Long> getLongList(String columnName);
312306

313307
/**
314308
* @param columnIndex index of the column
315309
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}.
316-
*
317310
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
318311
* may contain {@code NULL} values, use {@link #getDoubleList(int)} instead.
319312
*/
@@ -322,7 +315,6 @@ default Value getValue(String columnName) {
322315
/**
323316
* @param columnName name of the column
324317
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}.
325-
*
326318
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
327319
* may contain {@code NULL} values, use {@link #getDoubleList(String)} instead.
328320
*/
@@ -331,56 +323,56 @@ default Value getValue(String columnName) {
331323
/**
332324
* @param columnIndex index of the column
333325
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The
334-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
335-
* each element in the list multiple times.
326+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
327+
* access each element in the list multiple times.
336328
*/
337329
List<Double> getDoubleList(int columnIndex);
338330

339331
/**
340332
* @param columnName name of the column
341333
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The
342-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
343-
* each element in the list multiple times.
334+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
335+
* access each element in the list multiple times.
344336
*/
345337
List<Double> getDoubleList(String columnName);
346338

347339
/**
348340
* @param columnIndex index of the column
349341
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The
350-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
351-
* each element in the list multiple times.
342+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
343+
* access each element in the list multiple times.
352344
*/
353345
List<BigDecimal> getBigDecimalList(int columnIndex);
354346

355347
/**
356348
* @param columnName name of the column
357349
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The
358-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
359-
* each element in the list multiple times.
350+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
351+
* access each element in the list multiple times.
360352
*/
361353
List<BigDecimal> getBigDecimalList(String columnName);
362354

363355
/**
364356
* @param columnIndex index of the column
365357
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The
366-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
367-
* each element in the list multiple times.
358+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
359+
* access each element in the list multiple times.
368360
*/
369361
List<String> getStringList(int columnIndex);
370362

371363
/**
372364
* @param columnName name of the column
373365
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The
374-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
375-
* each element in the list multiple times.
366+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
367+
* access each element in the list multiple times.
376368
*/
377369
List<String> getStringList(String columnName);
378370

379371
/**
380372
* @param columnIndex index of the column
381373
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The
382-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
383-
* each element in the list multiple times.
374+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
375+
* access each element in the list multiple times.
384376
*/
385377
default List<String> getJsonList(int columnIndex) {
386378
throw new UnsupportedOperationException("method should be overwritten");
@@ -389,8 +381,8 @@ default List<String> getJsonList(int columnIndex) {
389381
/**
390382
* @param columnName name of the column
391383
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The
392-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
393-
* each element in the list multiple times.
384+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
385+
* access each element in the list multiple times.
394386
*/
395387
default List<String> getJsonList(String columnName) {
396388
throw new UnsupportedOperationException("method should be overwritten");
@@ -399,8 +391,8 @@ default List<String> getJsonList(String columnName) {
399391
/**
400392
* @param columnIndex index of the column
401393
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The
402-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
403-
* each element in the list multiple times.
394+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
395+
* access each element in the list multiple times.
404396
*/
405397
default List<String> getPgJsonbList(int columnIndex) {
406398
throw new UnsupportedOperationException("method should be overwritten");
@@ -409,8 +401,8 @@ default List<String> getPgJsonbList(int columnIndex) {
409401
/**
410402
* @param columnName name of the column
411403
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The
412-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
413-
* each element in the list multiple times.
404+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
405+
* access each element in the list multiple times.
414406
*/
415407
default List<String> getPgJsonbList(String columnName) {
416408
throw new UnsupportedOperationException("method should be overwritten");
@@ -419,64 +411,64 @@ default List<String> getPgJsonbList(String columnName) {
419411
/**
420412
* @param columnIndex index of the column
421413
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The
422-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
423-
* each element in the list multiple times.
414+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
415+
* access each element in the list multiple times.
424416
*/
425417
List<ByteArray> getBytesList(int columnIndex);
426418

427419
/**
428420
* @param columnName name of the column
429421
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The
430-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
431-
* each element in the list multiple times.
422+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
423+
* access each element in the list multiple times.
432424
*/
433425
List<ByteArray> getBytesList(String columnName);
434426

435427
/**
436428
* @param columnIndex index of the column
437429
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())}
438-
* The list returned by this method is lazily constructed. Create a copy of it if you intend to
439-
* access each element in the list multiple times.
430+
* The list returned by this method is lazily constructed. Create a copy of it if you intend
431+
* to access each element in the list multiple times.
440432
*/
441433
List<Timestamp> getTimestampList(int columnIndex);
442434

443435
/**
444436
* @param columnName name of the column
445437
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())}
446-
* The list returned by this method is lazily constructed. Create a copy of it if you intend to
447-
* access each element in the list multiple times.
438+
* The list returned by this method is lazily constructed. Create a copy of it if you intend
439+
* to access each element in the list multiple times.
448440
*/
449441
List<Timestamp> getTimestampList(String columnName);
450442

451443
/**
452444
* @param columnIndex index of the column
453445
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The
454-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
455-
* each element in the list multiple times.
446+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
447+
* access each element in the list multiple times.
456448
*/
457449
List<Date> getDateList(int columnIndex);
458450

459451
/**
460452
* @param columnName name of the column
461453
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The
462-
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
463-
* each element in the list multiple times.
454+
* list returned by this method is lazily constructed. Create a copy of it if you intend to
455+
* access each element in the list multiple times.
464456
*/
465457
List<Date> getDateList(String columnName);
466458

467459
/**
468460
* @param columnIndex index of the column
469461
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))}
470-
* The list returned by this method is lazily constructed. Create a copy of it if you intend to
471-
* access each element in the list multiple times.
462+
* The list returned by this method is lazily constructed. Create a copy of it if you intend
463+
* to access each element in the list multiple times.
472464
*/
473465
List<Struct> getStructList(int columnIndex);
474466

475467
/**
476468
* @param columnName name of the column
477469
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))}
478-
* The list returned by this method is lazily constructed. Create a copy of it if you intend to
479-
* access each element in the list multiple times.
470+
* The list returned by this method is lazily constructed. Create a copy of it if you intend
471+
* to access each element in the list multiple times.
480472
*/
481473
List<Struct> getStructList(String columnName);
482474
}

0 commit comments

Comments
 (0)