From 744013160438f279ce7a73e4ac126c01fa6b33f1 Mon Sep 17 00:00:00 2001 From: Arpan Mishra Date: Thu, 20 Jul 2023 19:03:10 +0530 Subject: [PATCH 1/9] docs:fix errors in documentation. --- .../google/cloud/spanner/StructReader.java | 97 ++++++++++++------- 1 file changed, 64 insertions(+), 33 deletions(-) diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java index b767bd6d82c..a4151186eae 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java @@ -52,21 +52,21 @@ */ public interface StructReader { /** - * Returns the type of the underlying data. This will always be a {@code STRUCT} type, with fields + * @return the type of the underlying data. This will always be a {@code STRUCT} type, with fields * corresponding to the data's columns. For the result of a read or query, this will always match * the columns passed to the {@code read()} call or named in the query text, in order. */ Type getType(); /** - * Returns the number of columns in the underlying data. This includes any columns with {@code + * @return the number of columns in the underlying data. This includes any columns with {@code * NULL} values. */ int getColumnCount(); /** - * Returns the index of the column named {@code columnName}. - * + * @param columnName + * @return the index of the column named {@code columnName}. * @throws IllegalArgumentException if there is not exactly one element of {@code * type().structFields()} with {@link Type.StructField#getName()} equal to {@code columnName} */ @@ -157,13 +157,17 @@ default Value getValue(int columnIndex) { throw new UnsupportedOperationException("method should be overwritten"); } - /** Returns the value of a nullable column as a {@link Value}. */ + /** + * @param columnName + * @return the value of a nullable column as a {@link Value}. + */ default Value getValue(String columnName) { throw new UnsupportedOperationException("method should be overwritten"); } /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array * may contain {@code NULL} values, use {@link #getBooleanList(int)} instead. @@ -171,7 +175,8 @@ default Value getValue(String columnName) { boolean[] getBooleanArray(int columnIndex); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. + * @param columnName + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array * may contain {@code NULL} values, use {@link #getBooleanList(String)} instead. @@ -179,21 +184,24 @@ default Value getValue(String columnName) { boolean[] getBooleanArray(String columnName); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ List getBooleanList(int columnIndex); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The + * @param columnName + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ List getBooleanList(String columnName); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array * may contain {@code NULL} values, use {@link #getLongList(int)} instead. @@ -201,7 +209,8 @@ default Value getValue(String columnName) { long[] getLongArray(int columnIndex); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. + * @param columnName + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array * may contain {@code NULL} values, use {@link #getLongList(String)} instead. @@ -209,21 +218,24 @@ default Value getValue(String columnName) { long[] getLongArray(String columnName); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ List getLongList(int columnIndex); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The + * @param columnName + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ List getLongList(String columnName); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}. + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}. * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array * may contain {@code NULL} values, use {@link #getDoubleList(int)} instead. @@ -231,7 +243,8 @@ default Value getValue(String columnName) { double[] getDoubleArray(int columnIndex); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}. + * @param columnName + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}. * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array * may contain {@code NULL} values, use {@link #getDoubleList(String)} instead. @@ -239,49 +252,56 @@ default Value getValue(String columnName) { double[] getDoubleArray(String columnName); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ List getDoubleList(int columnIndex); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The + * @param columnName + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ List getDoubleList(String columnName); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ List getBigDecimalList(int columnIndex); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The + * @param columnName + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ List getBigDecimalList(String columnName); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ List getStringList(int columnIndex); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The + * @param columnName + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ List getStringList(String columnName); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ @@ -290,7 +310,8 @@ default List getJsonList(int columnIndex) { }; /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The + * @param columnName + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ @@ -299,7 +320,8 @@ default List getJsonList(String columnName) { }; /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ @@ -308,7 +330,8 @@ default List getPgJsonbList(int columnIndex) { }; /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The + * @param columnName + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ @@ -317,56 +340,64 @@ default List getPgJsonbList(String columnName) { }; /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ List getBytesList(int columnIndex); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The + * @param columnName + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ List getBytesList(String columnName); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())} + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())} * The list returned by this method is lazily constructed. Create a copy of it if you intend to * access each element in the list multiple times. */ List getTimestampList(int columnIndex); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())} + * @param columnName + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())} * The list returned by this method is lazily constructed. Create a copy of it if you intend to * access each element in the list multiple times. */ List getTimestampList(String columnName); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ List getDateList(int columnIndex); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The + * @param columnName + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. */ List getDateList(String columnName); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))} + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))} * The list returned by this method is lazily constructed. Create a copy of it if you intend to * access each element in the list multiple times. */ List getStructList(int columnIndex); /** - * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))} + * @param columnName + * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))} * The list returned by this method is lazily constructed. Create a copy of it if you intend to * access each element in the list multiple times. */ From dd801857b983e63e049a38ddf0873514c2b5175e Mon Sep 17 00:00:00 2001 From: Arpan Mishra Date: Thu, 20 Jul 2023 19:11:39 +0530 Subject: [PATCH 2/9] docs:fix errors in documentation. --- .../google/cloud/spanner/StructReader.java | 127 ++++++++++++++---- 1 file changed, 102 insertions(+), 25 deletions(-) diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java index a4151186eae..eeaddd405d4 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java @@ -72,87 +72,164 @@ public interface StructReader { */ int getColumnIndex(String columnName); - /** Returns the type of a column. */ + /** + * @param columnIndex + * @return the type of a column. + */ Type getColumnType(int columnIndex); - /** Returns the type of a column. */ + /** + * @param columnName + * @return the type of a column. + */ Type getColumnType(String columnName); - /** Returns {@code true} if a column contains a {@code NULL} value. */ + /** + * @param columnIndex + * @return {@code true} if a column contains a {@code NULL} value. + */ boolean isNull(int columnIndex); - /** Returns {@code true} if a column contains a {@code NULL} value. */ + /** + * @param columnName + * @return {@code true} if a column contains a {@code NULL} value. + */ boolean isNull(String columnName); - /** Returns the value of a non-{@code NULL} column with type {@link Type#bool()}. */ + /** + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@link Type#bool()}. + */ boolean getBoolean(int columnIndex); - /** Returns the value of a non-{@code NULL} column with type {@link Type#bool()}. */ + /** + * @param columnName + * @return the value of a non-{@code NULL} column with type {@link Type#bool()}. + */ boolean getBoolean(String columnName); - /** Returns the value of a non-{@code NULL} column with type {@link Type#int64()}. */ + /** + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@link Type#int64()}. + */ long getLong(int columnIndex); - /** Returns the value of a non-{@code NULL} column with type {@link Type#int64()}. */ + /** + * @param columnName + * @return the value of a non-{@code NULL} column with type {@link Type#int64()}. + */ long getLong(String columnName); - /** Returns the value of a non-{@code NULL} column with type {@link Type#float64()}. */ + /** + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@link Type#float64()}. + */ double getDouble(int columnIndex); - /** Returns the value of a non-{@code NULL} column with type {@link Type#float64()}. */ + /** + * @param columnName + * @return the value of a non-{@code NULL} column with type {@link Type#float64()}. + */ double getDouble(String columnName); - /** Returns the value of a non-{@code NULL} column with type {@link Type#numeric()}. */ + /** + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@link Type#numeric()}. + */ BigDecimal getBigDecimal(int columnIndex); - /** Returns the value of a non-{@code NULL} column with type {@link Type#numeric()}. */ + /** + * @param columnName + * @return the value of a non-{@code NULL} column with type {@link Type#numeric()}. + */ BigDecimal getBigDecimal(String columnName); - /** Returns the value of a non-{@code NULL} column with type {@link Type#string()}. */ + /** + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@link Type#string()}. + */ String getString(int columnIndex); - /** Returns the value of a non-{@code NULL} column with type {@link Type#string()}. */ + /** + * @param columnName + * @return the value of a non-{@code NULL} column with type {@link Type#string()}. + */ String getString(String columnName); - /** Returns the value of a non-{@code NULL} column with type {@link Type#json()}. */ + /** + * + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@link Type#json()}. + */ default String getJson(int columnIndex) { throw new UnsupportedOperationException("method should be overwritten"); } - /** Returns the value of a non-{@code NULL} column with type {@link Type#json()}. */ + /** + * @param columnName + * @return the value of a non-{@code NULL} column with type {@link Type#json()}. + */ default String getJson(String columnName) { throw new UnsupportedOperationException("method should be overwritten"); } - /** Returns the value of a non-{@code NULL} column with type {@link Type#pgJsonb()}. */ + /** + * + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@link Type#pgJsonb()}. + */ default String getPgJsonb(int columnIndex) { throw new UnsupportedOperationException("method should be overwritten"); } - /** Returns the value of a non-{@code NULL} column with type {@link Type#pgJsonb()}. */ + /** + * @param columnName + * @return the value of a non-{@code NULL} column with type {@link Type#pgJsonb()}. + */ default String getPgJsonb(String columnName) { throw new UnsupportedOperationException("method should be overwritten"); } - /** Returns the value of a non-{@code NULL} column with type {@link Type#bytes()}. */ + /** + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@link Type#bytes()}. + */ ByteArray getBytes(int columnIndex); - /** Returns the value of a non-{@code NULL} column with type {@link Type#bytes()}. */ + /** + * @param columnName + * @return the value of a non-{@code NULL} column with type {@link Type#bytes()}. + */ ByteArray getBytes(String columnName); - /** Returns the value of a non-{@code NULL} column with type {@link Type#timestamp()}. */ + /** + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@link Type#timestamp()}. + */ Timestamp getTimestamp(int columnIndex); - /** Returns the value of a non-{@code NULL} column with type {@link Type#timestamp()}. */ + /** + * @param columnName + * @return the value of a non-{@code NULL} column with type {@link Type#timestamp()}. + */ Timestamp getTimestamp(String columnName); - /** Returns the value of a non-{@code NULL} column with type {@link Type#date()}. */ + /** + * @param columnIndex + * @return the value of a non-{@code NULL} column with type {@link Type#date()}. + */ Date getDate(int columnIndex); - /** Returns the value of a non-{@code NULL} column with type {@link Type#date()}. */ + /** + * @param columnName + * @return the value of a non-{@code NULL} column with type {@link Type#date()}. + */ Date getDate(String columnName); - /** Returns the value of a nullable column as a {@link Value}. */ + /** + * @param columnIndex + * @return the value of a nullable column as a {@link Value}. + */ default Value getValue(int columnIndex) { throw new UnsupportedOperationException("method should be overwritten"); } From 401b89fb159e604541c843b379fdb1ca72dbdb5b Mon Sep 17 00:00:00 2001 From: Arpan Mishra Date: Thu, 20 Jul 2023 19:38:24 +0530 Subject: [PATCH 3/9] fix: doc errors. --- .../google/cloud/spanner/AsyncResultSet.java | 2 +- .../google/cloud/spanner/StructReader.java | 108 +++++++++--------- .../google/cloud/spanner/TimestampBound.java | 8 +- .../cloud/spanner/TransactionContext.java | 6 +- .../connection/AbstractStatementParser.java | 54 +++++++-- 5 files changed, 108 insertions(+), 70 deletions(-) diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSet.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSet.java index 501ae054e9f..d05ed07e44a 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSet.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSet.java @@ -115,7 +115,7 @@ interface ReadyCallback { * CursorState#NOT_READY}. * * - *

Flow Control

+ *

Flow Control

* * If no flow control is needed (say because result sizes are known in advance to be finite in * size) then async processing is simple. The following is a code example that transfers work from diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java index eeaddd405d4..ce7983462b3 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java @@ -65,7 +65,7 @@ public interface StructReader { int getColumnCount(); /** - * @param columnName + * @param columnName name of the column * @return the index of the column named {@code columnName}. * @throws IllegalArgumentException if there is not exactly one element of {@code * type().structFields()} with {@link Type.StructField#getName()} equal to {@code columnName} @@ -73,92 +73,92 @@ public interface StructReader { int getColumnIndex(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the type of a column. */ Type getColumnType(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the type of a column. */ Type getColumnType(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return {@code true} if a column contains a {@code NULL} value. */ boolean isNull(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return {@code true} if a column contains a {@code NULL} value. */ boolean isNull(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@link Type#bool()}. */ boolean getBoolean(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@link Type#bool()}. */ boolean getBoolean(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@link Type#int64()}. */ long getLong(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@link Type#int64()}. */ long getLong(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@link Type#float64()}. */ double getDouble(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@link Type#float64()}. */ double getDouble(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@link Type#numeric()}. */ BigDecimal getBigDecimal(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@link Type#numeric()}. */ BigDecimal getBigDecimal(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@link Type#string()}. */ String getString(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@link Type#string()}. */ String getString(String columnName); /** * - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@link Type#json()}. */ default String getJson(int columnIndex) { @@ -166,7 +166,7 @@ default String getJson(int columnIndex) { } /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@link Type#json()}. */ default String getJson(String columnName) { @@ -175,7 +175,7 @@ default String getJson(String columnName) { /** * - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@link Type#pgJsonb()}. */ default String getPgJsonb(int columnIndex) { @@ -183,7 +183,7 @@ default String getPgJsonb(int columnIndex) { } /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@link Type#pgJsonb()}. */ default String getPgJsonb(String columnName) { @@ -191,43 +191,43 @@ default String getPgJsonb(String columnName) { } /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@link Type#bytes()}. */ ByteArray getBytes(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@link Type#bytes()}. */ ByteArray getBytes(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@link Type#timestamp()}. */ Timestamp getTimestamp(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@link Type#timestamp()}. */ Timestamp getTimestamp(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@link Type#date()}. */ Date getDate(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@link Type#date()}. */ Date getDate(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a nullable column as a {@link Value}. */ default Value getValue(int columnIndex) { @@ -235,7 +235,7 @@ default Value getValue(int columnIndex) { } /** - * @param columnName + * @param columnName name of the column * @return the value of a nullable column as a {@link Value}. */ default Value getValue(String columnName) { @@ -243,7 +243,7 @@ default Value getValue(String columnName) { } /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array @@ -252,7 +252,7 @@ default Value getValue(String columnName) { boolean[] getBooleanArray(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array @@ -261,7 +261,7 @@ default Value getValue(String columnName) { boolean[] getBooleanArray(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -269,7 +269,7 @@ default Value getValue(String columnName) { List getBooleanList(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -277,7 +277,7 @@ default Value getValue(String columnName) { List getBooleanList(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array @@ -286,7 +286,7 @@ default Value getValue(String columnName) { long[] getLongArray(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array @@ -295,7 +295,7 @@ default Value getValue(String columnName) { long[] getLongArray(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -311,7 +311,7 @@ default Value getValue(String columnName) { List getLongList(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}. * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array @@ -320,7 +320,7 @@ default Value getValue(String columnName) { double[] getDoubleArray(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}. * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array @@ -329,7 +329,7 @@ default Value getValue(String columnName) { double[] getDoubleArray(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -337,7 +337,7 @@ default Value getValue(String columnName) { List getDoubleList(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -345,7 +345,7 @@ default Value getValue(String columnName) { List getDoubleList(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -353,7 +353,7 @@ default Value getValue(String columnName) { List getBigDecimalList(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -361,7 +361,7 @@ default Value getValue(String columnName) { List getBigDecimalList(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -369,7 +369,7 @@ default Value getValue(String columnName) { List getStringList(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -377,7 +377,7 @@ default Value getValue(String columnName) { List getStringList(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -387,7 +387,7 @@ default List getJsonList(int columnIndex) { }; /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -397,7 +397,7 @@ default List getJsonList(String columnName) { }; /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -407,7 +407,7 @@ default List getPgJsonbList(int columnIndex) { }; /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -417,7 +417,7 @@ default List getPgJsonbList(String columnName) { }; /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -425,7 +425,7 @@ default List getPgJsonbList(String columnName) { List getBytesList(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -433,7 +433,7 @@ default List getPgJsonbList(String columnName) { List getBytesList(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())} * The list returned by this method is lazily constructed. Create a copy of it if you intend to * access each element in the list multiple times. @@ -441,7 +441,7 @@ default List getPgJsonbList(String columnName) { List getTimestampList(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())} * The list returned by this method is lazily constructed. Create a copy of it if you intend to * access each element in the list multiple times. @@ -449,7 +449,7 @@ default List getPgJsonbList(String columnName) { List getTimestampList(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -457,7 +457,7 @@ default List getPgJsonbList(String columnName) { List getDateList(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The * list returned by this method is lazily constructed. Create a copy of it if you intend to access * each element in the list multiple times. @@ -465,7 +465,7 @@ default List getPgJsonbList(String columnName) { List getDateList(String columnName); /** - * @param columnIndex + * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))} * The list returned by this method is lazily constructed. Create a copy of it if you intend to * access each element in the list multiple times. @@ -473,7 +473,7 @@ default List getPgJsonbList(String columnName) { List getStructList(int columnIndex); /** - * @param columnName + * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))} * The list returned by this method is lazily constructed. Create a copy of it if you intend to * access each element in the list multiple times. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TimestampBound.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TimestampBound.java index 5d14687b4c0..6502077cd65 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TimestampBound.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TimestampBound.java @@ -46,7 +46,7 @@ * *

Each type of timestamp bound is discussed in detail below. * - *

Strong reads

+ *

Strong reads

* *

Strong reads are guaranteed to see the effects of all transactions that have committed before * the start of the read. Furthermore, all rows yielded by a single read are consistent with each @@ -59,7 +59,7 @@ * *

Use {@link #strong()} to create a bound of this type. * - *

Exact Staleness

+ *

Exact Staleness

* *

These timestamp bounds execute reads at a user-specified timestamp. Reads at a timestamp are * guaranteed to see a consistent prefix of the global transaction history: they observe @@ -78,7 +78,7 @@ *

Use {@link #ofReadTimestamp(Timestamp)} and {@link #ofExactStaleness(long, TimeUnit)} to * create a bound of this type. * - *

Bounded Staleness

+ *

Bounded Staleness

* *

Bounded staleness modes allow Cloud Spanner to pick the read timestamp, subject to a * user-provided staleness bound. Cloud Spanner chooses the newest timestamp within the staleness @@ -103,7 +103,7 @@ *

Use {@link #ofMinReadTimestamp(Timestamp)} and {@link #ofMaxStaleness(long, TimeUnit)} to * create a bound of this type. * - *

Old Read Timestamps and Garbage Collection

+ *

Old Read Timestamps and Garbage Collection

* *

Cloud Spanner continuously garbage collects deleted and overwritten data in the background to * reclaim storage space. This process is known as "version GC". By default, version GC reclaims diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionContext.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionContext.java index b858616c131..539f3d4c8ac 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionContext.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionContext.java @@ -44,7 +44,7 @@ *

Conceptually, a read-write transaction consists of zero or more reads or SQL queries followed * by a commit. * - *

Semantics

+ *

Semantics

* *

Cloud Spanner can commit the transaction if all read locks it acquired are still valid at * commit time, and it is able to acquire write locks for all writes. Cloud Spanner can abort the @@ -55,7 +55,7 @@ * transaction's locks were held for. It is an error to use Cloud Spanner locks for any sort of * mutual exclusion other than between Cloud Spanner transactions themselves. * - *

Retrying Aborted Transactions

+ *

Retrying Aborted Transactions

* *

When a transaction aborts, the application can choose to retry the whole transaction again. To * maximize the chances of successfully committing the retry, the client should execute the retry in @@ -71,7 +71,7 @@ *

Application code does not need to retry explicitly; {@link TransactionRunner} will * automatically retry a transaction if an attempt results in an abort. * - *

Idle Transactions

+ *

Idle Transactions

* *

A transaction is considered idle if it has no outstanding reads or SQL queries and has not * started a read or SQL query within the last 10 seconds. Idle transactions can be aborted by Cloud diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractStatementParser.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractStatementParser.java index b0ae8863e6f..0d2c57668de 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractStatementParser.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractStatementParser.java @@ -57,7 +57,11 @@ public abstract class AbstractStatementParser { Dialect.POSTGRESQL, PostgreSQLStatementParser.class); - /** Get an instance of {@link AbstractStatementParser} for the specified dialect. */ + /** + * Get an instance of {@link AbstractStatementParser} for the specified dialect. + * @param dialect + * @return + */ public static AbstractStatementParser getInstance(Dialect dialect) { synchronized (lock) { if (!INSTANCES.containsKey(dialect)) { @@ -227,20 +231,24 @@ public boolean equals(Object other) { && Objects.equals(this.sqlWithoutComments, o.sqlWithoutComments); } - /** Returns the type of statement that was recognized by the parser. */ + /** + * @return the type of statement that was recognized by the parser. + */ @InternalApi public StatementType getType() { return type; } - /** Returns whether the statement has a returning clause or not. * */ + /** + * @return whether the statement has a returning clause or not. + */ @InternalApi public boolean hasReturningClause() { return this.returningClause; } /** - * Returns true if the statement is a query that will return a {@link + * @return true if the statement is a query that will return a {@link * com.google.cloud.spanner.ResultSet}. */ @InternalApi @@ -259,7 +267,7 @@ public boolean isQuery() { } /** - * Returns true if the statement is a DML statement or a client side statement that will return + * @return true if the statement is a DML statement or a client side statement that will return * an update count. */ @InternalApi @@ -277,7 +285,9 @@ public boolean isUpdate() { return false; } - /** Returns true if the statement is a DDL statement. */ + /** + * @return true if the statement is a DDL statement. + */ @InternalApi public boolean isDdl() { switch (type) { @@ -293,7 +303,7 @@ public boolean isDdl() { } /** - * Returns the {@link ClientSideStatementType} of this statement. This method may only be called + * @return the {@link ClientSideStatementType} of this statement. This method may only be called * on statements of type {@link StatementType#CLIENT_SIDE}. */ @InternalApi @@ -326,7 +336,9 @@ Statement mergeQueryOptions(Statement statement, QueryOptions defaultQueryOption .build(); } - /** Returns the SQL statement with all comments removed from the SQL string. */ + /** + * @return the SQL statement with all comments removed from the SQL string. + */ @InternalApi public String getSqlWithoutComments() { return sqlWithoutComments; @@ -494,6 +506,12 @@ private boolean statementStartsWith(String sql, Iterable checkStatements @InternalApi abstract String removeCommentsAndTrimInternal(String sql); + /** + * Removes comments from and trims the given sql statement using the dialect of this parser. + * + * @param sql The sql statement to remove comments from and to trim. + * @return the sql statement without the comments and leading and trailing spaces. + */ @InternalApi public String removeCommentsAndTrim(String sql) { return removeCommentsAndTrimInternal(sql); @@ -531,6 +549,19 @@ public static class ParametersInfo { abstract ParametersInfo convertPositionalParametersToNamedParametersInternal( char paramChar, String sql); + /** + * Converts all positional parameters (?) in the given sql string into named parameters. The + * parameters are named @p1, @p2, etc. This method is used when converting a JDBC statement that + * uses positional parameters to a Cloud Spanner {@link Statement} instance that requires named + * parameters. The input SQL string may not contain any comments. There is an exception case if + * the statement starts with a GSQL comment which forces it to be interpreted as a GoogleSql + * statement. + * + * @param sql The sql string without comments that should be converted + * @return A {@link ParametersInfo} object containing a string with named parameters instead of + * positional parameters and the number of parameters. + * @throws SpannerException If the input sql string contains an unclosed string/byte literal. + */ @InternalApi public ParametersInfo convertPositionalParametersToNamedParameters(char paramChar, String sql) { return convertPositionalParametersToNamedParametersInternal(paramChar, sql); @@ -557,6 +588,13 @@ static int countOccurrencesOf(char c, String string) { @InternalApi protected abstract boolean checkReturningClauseInternal(String sql); + /** + * Checks if the given SQL string contains a Returning clause. This method is used only in case of + * a DML statement. + * + * @param sql The sql string without comments that has to be evaluated. + * @return A boolean indicating whether the sql string has a Returning clause or not. + */ @InternalApi public boolean checkReturningClause(String sql) { return checkReturningClauseInternal(sql); From 32c61226a452a8331140774fffab6332eb2a1b6a Mon Sep 17 00:00:00 2001 From: Arpan Mishra Date: Thu, 20 Jul 2023 19:45:36 +0530 Subject: [PATCH 4/9] fix: doc errors. --- .../google/cloud/spanner/DatabaseClient.java | 15 +-- .../google/cloud/spanner/StructReader.java | 102 ++++++++---------- .../cloud/spanner/TransactionContext.java | 28 ++--- .../connection/AbstractStatementParser.java | 23 ++-- 4 files changed, 77 insertions(+), 91 deletions(-) diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java index a82225d5f44..0bcc499ac14 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java @@ -368,8 +368,8 @@ CommitResponse writeAtLeastOnceWithOptions( /** * Returns a transaction manager which allows manual management of transaction lifecycle. This API - * is meant for advanced users. Most users should instead use the {@link #readWriteTransaction()} - * API instead. + * is meant for advanced users. Most users should instead use the {@link + * #readWriteTransaction(TransactionOption...)} API instead. * *

Example of using {@link TransactionManager}. * @@ -449,7 +449,7 @@ CommitResponse writeAtLeastOnceWithOptions( /** * Returns an asynchronous transaction manager which allows manual management of transaction * lifecycle. This API is meant for advanced users. Most users should instead use the {@link - * #runAsync()} API instead. + * #runAsync(TransactionOption...)} API instead. * *

Example of using {@link AsyncTransactionManager}. * @@ -514,12 +514,13 @@ CommitResponse writeAtLeastOnceWithOptions( * *

Partitioned DML updates are used to execute a single DML statement with a different * execution strategy that provides different, and often better, scalability properties for large, - * table-wide operations than DML in a {@link #readWriteTransaction()} transaction. Smaller scoped - * statements, such as an OLTP workload, should prefer using {@link - * TransactionContext#executeUpdate(Statement)} with {@link #readWriteTransaction()}. + * table-wide operations than DML in a {@link #readWriteTransaction(TransactionOption...)} + * transaction. Smaller scoped statements, such as an OLTP workload, should prefer using {@link + * TransactionContext#executeUpdate(Statement,UpdateOption...)} with {@link + * #readWriteTransaction(TransactionOption...)}. * *

That said, Partitioned DML is not a drop-in replacement for standard DML used in {@link - * #readWriteTransaction()}. + * #readWriteTransaction(TransactionOption...)}. * *

    *
  • The DML statement must be fully-partitionable. Specifically, the statement must be diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java index ce7983462b3..ad085ca2dcc 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java @@ -53,14 +53,14 @@ public interface StructReader { /** * @return the type of the underlying data. This will always be a {@code STRUCT} type, with fields - * corresponding to the data's columns. For the result of a read or query, this will always match - * the columns passed to the {@code read()} call or named in the query text, in order. + * corresponding to the data's columns. For the result of a read or query, this will always + * match the columns passed to the {@code read()} call or named in the query text, in order. */ Type getType(); /** * @return the number of columns in the underlying data. This includes any columns with {@code - * NULL} values. + * NULL} values. */ int getColumnCount(); @@ -157,7 +157,6 @@ public interface StructReader { String getString(String columnName); /** - * * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@link Type#json()}. */ @@ -174,7 +173,6 @@ default String getJson(String columnName) { } /** - * * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@link Type#pgJsonb()}. */ @@ -245,7 +243,6 @@ default Value getValue(String columnName) { /** * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. - * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array * may contain {@code NULL} values, use {@link #getBooleanList(int)} instead. */ @@ -254,7 +251,6 @@ default Value getValue(String columnName) { /** * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. - * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array * may contain {@code NULL} values, use {@link #getBooleanList(String)} instead. */ @@ -263,23 +259,22 @@ default Value getValue(String columnName) { /** * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ List getBooleanList(int columnIndex); /** * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ List getBooleanList(String columnName); /** * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. - * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array * may contain {@code NULL} values, use {@link #getLongList(int)} instead. */ @@ -288,7 +283,6 @@ default Value getValue(String columnName) { /** * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. - * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array * may contain {@code NULL} values, use {@link #getLongList(String)} instead. */ @@ -297,23 +291,22 @@ default Value getValue(String columnName) { /** * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ List getLongList(int columnIndex); /** * @param columnName * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ List getLongList(String columnName); /** * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}. - * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array * may contain {@code NULL} values, use {@link #getDoubleList(int)} instead. */ @@ -322,7 +315,6 @@ default Value getValue(String columnName) { /** * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}. - * * @throws NullPointerException if any element of the array value is {@code NULL}. If the array * may contain {@code NULL} values, use {@link #getDoubleList(String)} instead. */ @@ -331,56 +323,56 @@ default Value getValue(String columnName) { /** * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ List getDoubleList(int columnIndex); /** * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ List getDoubleList(String columnName); /** * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ List getBigDecimalList(int columnIndex); /** * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ List getBigDecimalList(String columnName); /** * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ List getStringList(int columnIndex); /** * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ List getStringList(String columnName); /** * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ default List getJsonList(int columnIndex) { throw new UnsupportedOperationException("method should be overwritten"); @@ -389,8 +381,8 @@ default List getJsonList(int columnIndex) { /** * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ default List getJsonList(String columnName) { throw new UnsupportedOperationException("method should be overwritten"); @@ -399,8 +391,8 @@ default List getJsonList(String columnName) { /** * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ default List getPgJsonbList(int columnIndex) { throw new UnsupportedOperationException("method should be overwritten"); @@ -409,8 +401,8 @@ default List getPgJsonbList(int columnIndex) { /** * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ default List getPgJsonbList(String columnName) { throw new UnsupportedOperationException("method should be overwritten"); @@ -419,64 +411,64 @@ default List getPgJsonbList(String columnName) { /** * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ List getBytesList(int columnIndex); /** * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ List getBytesList(String columnName); /** * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())} - * The list returned by this method is lazily constructed. Create a copy of it if you intend to - * access each element in the list multiple times. + * The list returned by this method is lazily constructed. Create a copy of it if you intend + * to access each element in the list multiple times. */ List getTimestampList(int columnIndex); /** * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())} - * The list returned by this method is lazily constructed. Create a copy of it if you intend to - * access each element in the list multiple times. + * The list returned by this method is lazily constructed. Create a copy of it if you intend + * to access each element in the list multiple times. */ List getTimestampList(String columnName); /** * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ List getDateList(int columnIndex); /** * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The - * list returned by this method is lazily constructed. Create a copy of it if you intend to access - * each element in the list multiple times. + * list returned by this method is lazily constructed. Create a copy of it if you intend to + * access each element in the list multiple times. */ List getDateList(String columnName); /** * @param columnIndex index of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))} - * The list returned by this method is lazily constructed. Create a copy of it if you intend to - * access each element in the list multiple times. + * The list returned by this method is lazily constructed. Create a copy of it if you intend + * to access each element in the list multiple times. */ List getStructList(int columnIndex); /** * @param columnName name of the column * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))} - * The list returned by this method is lazily constructed. Create a copy of it if you intend to - * access each element in the list multiple times. + * The list returned by this method is lazily constructed. Create a copy of it if you intend + * to access each element in the list multiple times. */ List getStructList(String columnName); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionContext.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionContext.java index 539f3d4c8ac..58cb2b5416b 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionContext.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionContext.java @@ -118,13 +118,13 @@ default ApiFuture bufferAsync(Iterable mutations) { long executeUpdate(Statement statement, UpdateOption... options); /** - * Same as {@link #executeUpdate(Statement)}, but is guaranteed to be non-blocking. If multiple - * asynchronous update statements are submitted to the same read/write transaction, the statements - * are guaranteed to be submitted to Cloud Spanner in the order that they were submitted in the - * client. This does however not guarantee that an asynchronous update statement will see the - * results of all previously submitted statements, as the execution of the statements can be - * parallel. If you rely on the results of a previous statement, you should block until the result - * of that statement is known and has been returned to the client. + * Same as {@link #executeUpdate(Statement,UpdateOption...)}, but is guaranteed to be + * non-blocking. If multiple asynchronous update statements are submitted to the same read/write + * transaction, the statements are guaranteed to be submitted to Cloud Spanner in the order that + * they were submitted in the client. This does however not guarantee that an asynchronous update + * statement will see the results of all previously submitted statements, as the execution of the + * statements can be parallel. If you rely on the results of a previous statement, you should + * block until the result of that statement is known and has been returned to the client. */ ApiFuture executeUpdateAsync(Statement statement, UpdateOption... options); @@ -179,13 +179,13 @@ default ResultSet analyzeUpdateStatement( long[] batchUpdate(Iterable statements, UpdateOption... options); /** - * Same as {@link #batchUpdate(Iterable)}, but is guaranteed to be non-blocking. If multiple - * asynchronous update statements are submitted to the same read/write transaction, the statements - * are guaranteed to be submitted to Cloud Spanner in the order that they were submitted in the - * client. This does however not guarantee that an asynchronous update statement will see the - * results of all previously submitted statements, as the execution of the statements can be - * parallel. If you rely on the results of a previous statement, you should block until the result - * of that statement is known and has been returned to the client. + * Same as {@link #batchUpdate(Iterable, UpdateOption...)}, but is guaranteed to be non-blocking. + * If multiple asynchronous update statements are submitted to the same read/write transaction, + * the statements are guaranteed to be submitted to Cloud Spanner in the order that they were + * submitted in the client. This does however not guarantee that an asynchronous update statement + * will see the results of all previously submitted statements, as the execution of the statements + * can be parallel. If you rely on the results of a previous statement, you should block until the + * result of that statement is known and has been returned to the client. */ ApiFuture batchUpdateAsync(Iterable statements, UpdateOption... options); } diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractStatementParser.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractStatementParser.java index 0d2c57668de..0d9c431e171 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractStatementParser.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractStatementParser.java @@ -59,6 +59,7 @@ public abstract class AbstractStatementParser { /** * Get an instance of {@link AbstractStatementParser} for the specified dialect. + * * @param dialect * @return */ @@ -231,17 +232,13 @@ public boolean equals(Object other) { && Objects.equals(this.sqlWithoutComments, o.sqlWithoutComments); } - /** - * @return the type of statement that was recognized by the parser. - */ + /** @return the type of statement that was recognized by the parser. */ @InternalApi public StatementType getType() { return type; } - /** - * @return whether the statement has a returning clause or not. - */ + /** @return whether the statement has a returning clause or not. */ @InternalApi public boolean hasReturningClause() { return this.returningClause; @@ -249,7 +246,7 @@ public boolean hasReturningClause() { /** * @return true if the statement is a query that will return a {@link - * com.google.cloud.spanner.ResultSet}. + * com.google.cloud.spanner.ResultSet}. */ @InternalApi public boolean isQuery() { @@ -268,7 +265,7 @@ public boolean isQuery() { /** * @return true if the statement is a DML statement or a client side statement that will return - * an update count. + * an update count. */ @InternalApi public boolean isUpdate() { @@ -285,9 +282,7 @@ public boolean isUpdate() { return false; } - /** - * @return true if the statement is a DDL statement. - */ + /** @return true if the statement is a DDL statement. */ @InternalApi public boolean isDdl() { switch (type) { @@ -304,7 +299,7 @@ public boolean isDdl() { /** * @return the {@link ClientSideStatementType} of this statement. This method may only be called - * on statements of type {@link StatementType#CLIENT_SIDE}. + * on statements of type {@link StatementType#CLIENT_SIDE}. */ @InternalApi public ClientSideStatementType getClientSideStatementType() { @@ -336,9 +331,7 @@ Statement mergeQueryOptions(Statement statement, QueryOptions defaultQueryOption .build(); } - /** - * @return the SQL statement with all comments removed from the SQL string. - */ + /** @return the SQL statement with all comments removed from the SQL string. */ @InternalApi public String getSqlWithoutComments() { return sqlWithoutComments; From 2030f2751bee38cf24c08ff8e62d8cd869acd70e Mon Sep 17 00:00:00 2001 From: Arpan Mishra Date: Thu, 20 Jul 2023 21:06:51 +0530 Subject: [PATCH 5/9] fix: doc errors. --- .../google/cloud/spanner/AsyncResultSet.java | 16 +++++++++------- .../cloud/spanner/AsyncTransactionManager.java | 18 +++++++++--------- .../google/cloud/spanner/SpannerOptions.java | 12 ++++-------- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSet.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSet.java index d05ed07e44a..f5c5d6b22a9 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSet.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSet.java @@ -60,7 +60,8 @@ enum CallbackResponse { CONTINUE, /** - * Tell the cursor to suspend all callbacks until application calls {@link RowCursor#resume()}. + * Tell the cursor to suspend all callbacks until application calls {@link + * ForwardingAsyncResultSet#resume()}. */ PAUSE, @@ -68,8 +69,8 @@ enum CallbackResponse { * Tell the cursor you are done receiving results, even if there are more results sitting in the * buffer. Once you return DONE, you will receive no further callbacks. * - *

    Approximately equivalent to calling {@link RowCursor#cancel()}, and then returning {@code - * PAUSE}, but more clear, immediate, and idiomatic. + *

    Approximately equivalent to calling {@link ForwardingAsyncResultSet#cancel()}, and then + * returning {@code PAUSE}, but more clear, immediate, and idiomatic. * *

    It is legal to commit a transaction that owns this read before actually returning {@code * DONE}. @@ -105,11 +106,12 @@ interface ReadyCallback { *

  • Callback will stop being called once any of the following occurs: *
      *
    1. Callback returns {@link CallbackResponse#DONE}. - *
    2. {@link ResultSet#tryNext()} returns {@link CursorState#DONE}. - *
    3. {@link ResultSet#tryNext()} throws an exception. + *
    4. {@link ForwardingAsyncResultSet#tryNext()} returns {@link CursorState#DONE}. + *
    5. {@link ForwardingAsyncResultSet#tryNext()} throws an exception. *
    - *
  • Callback may possibly be invoked after a call to {@link ResultSet#cancel()} call, but the - * subsequent call to {@link #tryNext()} will yield a SpannerException. + *
  • Callback may possibly be invoked after a call to {@link + * ForwardingAsyncResultSet#cancel()} call, but the subsequent call to {@link #tryNext()} + * will yield a SpannerException. *
  • Spurious callbacks are possible where cursors are not actually ready. Typically callback * should return {@link CallbackResponse#CONTINUE} any time it sees {@link * CursorState#NOT_READY}. diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncTransactionManager.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncTransactionManager.java index 391be3d190b..df05c86b066 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncTransactionManager.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncTransactionManager.java @@ -18,7 +18,7 @@ import com.google.api.core.ApiFuture; import com.google.cloud.Timestamp; -import com.google.cloud.spanner.AsyncTransactionManager.TransactionContextFuture; +import com.google.cloud.spanner.Options.TransactionOption; import com.google.cloud.spanner.TransactionManager.TransactionState; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.MoreExecutors; @@ -43,7 +43,7 @@ * so can cause resources to be leaked and deadlocks. Easiest way to guarantee this is by calling * {@link #close()} in a finally block. * - * @see DatabaseClient#transactionManagerAsync() + * @see DatabaseClient#transactionManagerAsync(TransactionOption...) */ public interface AsyncTransactionManager extends AutoCloseable { /** @@ -91,10 +91,10 @@ Timestamp get(long timeout, TimeUnit unit) /** * {@link AsyncTransactionStep} is returned by {@link - * TransactionContextFuture#then(AsyncTransactionFunction)} and {@link - * AsyncTransactionStep#then(AsyncTransactionFunction)} and allows transaction steps that should - * be executed serially to be chained together. Each step can contain one or more statements that - * may execute in parallel. + * TransactionContextFuture#then(AsyncTransactionFunction, Executor)} and {@link + * AsyncTransactionStep#then(AsyncTransactionFunction, Executor)} and allows transaction steps + * that should be executed serially to be chained together. Each step can contain one or more + * statements that may execute in parallel. * *

    Example usage: * @@ -151,8 +151,8 @@ interface AsyncTransactionFunction { * @param input the result of the previous transaction step. * @return an {@link ApiFuture} that will return the result of this step, and that will be the * input of the next transaction step. This method should never return null. - * Instead, if the method does not have a return value, the method should return {@link - * ApiFutures#immediateFuture(null)}. + * Instead, if the method does not have a return value, the method should return + * ApiFutures#immediateFuture(null). */ ApiFuture apply(TransactionContext txn, I input) throws Exception; } @@ -160,7 +160,7 @@ interface AsyncTransactionFunction { /** * Creates a new read write transaction. This must be called before doing any other operation and * can only be called once. To create a new transaction for subsequent retries, see {@link - * #resetForRetry()}. + * #resetForRetryAsync()}. */ TransactionContextFuture beginAsync(); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java index 33fa826bfec..2f3bf10f9aa 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java @@ -32,6 +32,7 @@ import com.google.cloud.grpc.GcpManagedChannelOptions; import com.google.cloud.grpc.GrpcTransportOptions; import com.google.cloud.spanner.Options.QueryOption; +import com.google.cloud.spanner.Options.UpdateOption; import com.google.cloud.spanner.admin.database.v1.DatabaseAdminSettings; import com.google.cloud.spanner.admin.database.v1.stub.DatabaseAdminStubSettings; import com.google.cloud.spanner.admin.instance.v1.InstanceAdminSettings; @@ -134,10 +135,7 @@ public class SpannerOptions extends ServiceOptions { private final String compressorName; private final boolean leaderAwareRoutingEnabled; - /** - * Interface that can be used to provide {@link CallCredentials} instead of {@link Credentials} to - * {@link SpannerOptions}. - */ + /** Interface that can be used to provide {@link CallCredentials} to {@link SpannerOptions}. */ public interface CallCredentialsProvider { /** Return the {@link CallCredentials} to use for a gRPC call. */ CallCredentials getCallCredentials(); @@ -970,7 +968,7 @@ public DatabaseAdminStubSettings.Builder getDatabaseAdminStubSettingsBuilder() { /** * Sets a timeout specifically for Partitioned DML statements executed through {@link - * DatabaseClient#executePartitionedUpdate(Statement)}. The default is 2 hours. + * DatabaseClient#executePartitionedUpdate(Statement, UpdateOption...)}. The default is 2 hours. */ public Builder setPartitionedDmlTimeout(Duration timeout) { this.partitionedDmlTimeout = timeout; @@ -1065,9 +1063,7 @@ QueryOptions getEnvironmentQueryOptions() { /** * Sets a {@link CallCredentialsProvider} that can deliver {@link CallCredentials} to use on a - * per-gRPC basis. Any credentials returned by this {@link CallCredentialsProvider} will have - * preference above any {@link Credentials} that may have been set on the {@link SpannerOptions} - * instance. + * per-gRPC basis. */ public Builder setCallCredentialsProvider(CallCredentialsProvider callCredentialsProvider) { this.callCredentialsProvider = callCredentialsProvider; From 21c71ca4ac8017d9f66e3089560f88fcce92a01f Mon Sep 17 00:00:00 2001 From: Arpan Mishra Date: Thu, 20 Jul 2023 21:27:13 +0530 Subject: [PATCH 6/9] fix: doc errors. --- .../com/google/cloud/spanner/AbstractLazyInitializer.java | 2 ++ .../com/google/cloud/spanner/AsyncTransactionManager.java | 6 ++++++ .../src/main/java/com/google/cloud/spanner/Operation.java | 7 ++++++- .../java/com/google/cloud/spanner/TransactionManager.java | 3 ++- .../main/java/com/google/cloud/spanner/ValueBinder.java | 2 ++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractLazyInitializer.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractLazyInitializer.java index bc595b14662..73436852602 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractLazyInitializer.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractLazyInitializer.java @@ -19,6 +19,8 @@ /** * Generic {@link AbstractLazyInitializer} for any heavy-weight object that might throw an exception * during initialization. The underlying object is initialized at most once. + * + * @param Object which is to be initialized lazily */ public abstract class AbstractLazyInitializer { private final Object lock = new Object(); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncTransactionManager.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncTransactionManager.java index df05c86b066..c6ead432046 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncTransactionManager.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncTransactionManager.java @@ -115,6 +115,9 @@ Timestamp get(long timeout, TimeUnit unit) * executor) * .commitAsync(); * } + * + * @param + * @param */ interface AsyncTransactionStep extends ApiFuture { /** @@ -140,6 +143,9 @@ AsyncTransactionStep then( * a {@link TransactionContext} and the output value of the previous transaction step as its input * parameters. The method should return an {@link ApiFuture} that will return the result of this * step. + * + * @param + * @param */ interface AsyncTransactionFunction { /** diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Operation.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Operation.java index bd238d3ef8b..f8f9d1e9779 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Operation.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Operation.java @@ -32,7 +32,12 @@ import javax.annotation.Nullable; import org.threeten.bp.Duration; -/** Represents a long running operation. */ +/** + * Represents a long-running operation. + * + * @param + * @param + */ // TODO(user): Implement other operations on Operation. public class Operation { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionManager.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionManager.java index 0615e45b940..76656efea28 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionManager.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionManager.java @@ -17,6 +17,7 @@ package com.google.cloud.spanner; import com.google.cloud.Timestamp; +import com.google.cloud.spanner.Options.TransactionOption; /** * An interface for managing the life cycle of a read write transaction including all its retries. @@ -33,7 +34,7 @@ * can cause resources to be leaked and deadlocks. Easiest way to guarantee this is by calling * {@link #close()} in a finally block. * - * @see DatabaseClient#transactionManager() + * @see DatabaseClient#transactionManager(TransactionOption...) */ public interface TransactionManager extends AutoCloseable { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/ValueBinder.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/ValueBinder.java index e16b858faa8..07066470da6 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/ValueBinder.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/ValueBinder.java @@ -31,6 +31,8 @@ * *

    {@code ValueBinder} subclasses typically carry state and are therefore not thread-safe, * although the core implementation itself is thread-safe. + * + * @param The context which is used to bind the {@link Value}. */ public abstract class ValueBinder { /** From 7a7700e546c86d35e537c5b17a393307ce559730 Mon Sep 17 00:00:00 2001 From: Arpan Mishra Date: Fri, 21 Jul 2023 10:31:27 +0530 Subject: [PATCH 7/9] fix: doc errors. --- .../google/cloud/spanner/AsyncResultSet.java | 2 +- .../com/google/cloud/spanner/AsyncRunner.java | 5 ++-- .../cloud/spanner/DatabaseAdminClient.java | 2 +- .../google/cloud/spanner/DatabaseClient.java | 4 ++-- .../cloud/spanner/InstanceConfigInfo.java | 6 ++--- .../com/google/cloud/spanner/Options.java | 6 ++--- .../com/google/cloud/spanner/Session.java | 12 ++++++---- .../cloud/spanner/TransactionContext.java | 3 ++- .../cloud/spanner/TransactionRunner.java | 3 ++- .../cloud/spanner/GrpcResultSetTest.java | 2 +- .../spanner/InstanceAdminClientImplTest.java | 2 +- .../spanner/TransactionRunnerImplTest.java | 2 +- .../connection/AbstractSqlScriptVerifier.java | 24 +++++++++---------- .../spanner/connection/SqlScriptVerifier.java | 3 ++- 14 files changed, 41 insertions(+), 35 deletions(-) diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSet.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSet.java index f5c5d6b22a9..dfedcc4f8be 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSet.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncResultSet.java @@ -117,7 +117,7 @@ interface ReadyCallback { * CursorState#NOT_READY}. *

* - *

Flow Control

+ *

Flow Control

* * If no flow control is needed (say because result sizes are known in advance to be finite in * size) then async processing is simple. The following is a code example that transfers work from diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncRunner.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncRunner.java index 1703ef1ab27..3df3b9068b2 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncRunner.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/AsyncRunner.java @@ -18,6 +18,7 @@ import com.google.api.core.ApiFuture; import com.google.cloud.Timestamp; +import io.grpc.Status.Code; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; @@ -40,8 +41,8 @@ interface AsyncWork { *

In most cases, the implementation will not need to catch {@code SpannerException}s from * Spanner operations, instead letting these propagate to the framework. The transaction runner * will take appropriate action based on the type of exception. In particular, implementations - * should never catch an exception of type {@link SpannerErrors#isAborted}: these indicate that - * some reads may have returned inconsistent data and the transaction attempt must be aborted. + * should never catch an exception of type {@link Code#ABORTED}: these indicate that some reads + * may have returned inconsistent data and the transaction attempt must be aborted. * * @param txn the transaction * @return future over the result of the work diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseAdminClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseAdminClient.java index 9168c2a11dd..8372bb61fd3 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseAdminClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseAdminClient.java @@ -137,7 +137,7 @@ default OperationFuture createDatabase( * Database db = op.waitFor().getResult(); * } * - * @see also #createDatabase(String, String, Iterable) + * @see #createDatabase(String, String, Iterable) */ OperationFuture createDatabase( Database database, Iterable statements) throws SpannerException; diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java index 0bcc499ac14..f6acf04b6ca 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java @@ -412,7 +412,7 @@ CommitResponse writeAtLeastOnceWithOptions( * *

Example of a read write transaction. * - *

 
+   * 
{@code
    * Executor executor = Executors.newSingleThreadExecutor();
    * final long singerId = my_singer_id;
    * AsyncRunner runner = client.runAsync();
@@ -432,7 +432,7 @@ CommitResponse writeAtLeastOnceWithOptions(
    *                   .build());
    *         },
    *         executor);
-   * 
+ * }
* * Options for a transaction can include: * diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/InstanceConfigInfo.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/InstanceConfigInfo.java index f2b256fff40..39d32fc8a80 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/InstanceConfigInfo.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/InstanceConfigInfo.java @@ -117,9 +117,9 @@ public List getOptionalReplicas() { } /** - * Base configuration, e.g. projects//instanceConfigs/nam3, based on which this - * configuration is created. Only set for user managed configurations. The base config must refer - * to a configuration of type GOOGLE_MANAGED. + * Base configuration, e.g. {@code projects//instanceConfigs/nam3}, based on which + * this configuration is created. Only set for user managed configurations. The base config must + * refer to a configuration of type GOOGLE_MANAGED. */ public InstanceConfigInfo getBaseConfig() { return baseConfig; diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java index 9712b508d5f..0d804bfd933 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java @@ -156,9 +156,9 @@ public static ListOption pageSize(int pageSize) { } /** - * If this is for a partitioned read & query and this field is set to `true`, the request will be - * executed via Spanner independent compute resources. The method is available in Beta mode (and - * is not generally available now). + * If this is for a partitioned read and query and this field is set to `true`, the request will + * be executed via Spanner independent compute resources. The method is available in Beta mode + * (and is not generally available now). */ @BetaApi public static DataBoostQueryOption dataBoostEnabled(Boolean dataBoostEnabled) { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Session.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Session.java index d322e0fb6d0..98c40b49ccc 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Session.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Session.java @@ -18,6 +18,7 @@ import com.google.api.core.ApiFuture; import com.google.api.core.InternalApi; +import com.google.cloud.spanner.Options.TransactionOption; import com.google.protobuf.Empty; /** @@ -48,11 +49,12 @@ public interface Session extends DatabaseClient, AutoCloseable { String getName(); /** - * Prepares a transaction for use by a subsequent {@link #readWriteTransaction()} or {@link - * #write(Iterable)} call. It is not necessary to call this method before running a transaction or - * performing a write, but doing so may allow one round trip of the protocol to be performed in - * advance; calling this method on an idle session that is expected to execute a transaction or - * write in the near future may reduce the latency of the subsequent transaction/write. + * Prepares a transaction for use by a subsequent {@link + * DatabaseClient#readWriteTransaction(TransactionOption...)} or {@link #write(Iterable)} call. It + * is not necessary to call this method before running a transaction or performing a write, but + * doing so may allow one round trip of the protocol to be performed in advance; calling this + * method on an idle session that is expected to execute a transaction or write in the near future + * may reduce the latency of the subsequent transaction/write. */ void prepareReadWriteTransaction(); diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionContext.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionContext.java index 58cb2b5416b..4a21d9c2cca 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionContext.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionContext.java @@ -17,6 +17,7 @@ package com.google.cloud.spanner; import com.google.api.core.ApiFuture; +import com.google.cloud.spanner.Options.TransactionOption; import com.google.cloud.spanner.Options.UpdateOption; import com.google.spanner.v1.ResultSetStats; @@ -81,7 +82,7 @@ *

If this behavior is undesirable, periodically executing a simple SQL query in the transaction * (e.g., {@code SELECT 1}) prevents the transaction from becoming idle. * - * @see Session#readWriteTransaction() + * @see DatabaseClient#readWriteTransaction(TransactionOption...) * @see TransactionRunner */ public interface TransactionContext extends ReadContext { diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionRunner.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionRunner.java index e7167451f01..09bc11f152b 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionRunner.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/TransactionRunner.java @@ -17,13 +17,14 @@ package com.google.cloud.spanner; import com.google.cloud.Timestamp; +import com.google.cloud.spanner.Options.TransactionOption; import javax.annotation.Nullable; /** * An interface for executing a body of work in the context of a read-write transaction, with * retries for transaction aborts. See {@link TransactionContext} for a description of transaction * semantics. {@code TransactionRunner} instances are obtained by calling {@link - * Session#readWriteTransaction()}. + * DatabaseClient#readWriteTransaction(TransactionOption...)}. * *

A {@code TransactionRunner} instance can only be used for a single invocation of {@link * #run(TransactionCallable)}. diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/GrpcResultSetTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/GrpcResultSetTest.java index 490eff3aca8..e35ecf9ad9a 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/GrpcResultSetTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/GrpcResultSetTest.java @@ -51,7 +51,7 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -/** Unit tests for {@link com.google.cloud.spanner.SpannerImpl.GrpcResultSet}. */ +/** Unit tests for {@link com.google.cloud.spanner.AbstractResultSet.GrpcResultSet}. */ @RunWith(JUnit4.class) public class GrpcResultSetTest { diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/InstanceAdminClientImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/InstanceAdminClientImplTest.java index d8134ef29d6..7084290b24a 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/InstanceAdminClientImplTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/InstanceAdminClientImplTest.java @@ -54,7 +54,7 @@ import org.junit.runners.JUnit4; import org.mockito.Mock; -/** Unit tests for {@link com.google.cloud.spanner.SpannerImpl.InstanceAdminClientImpl}. */ +/** Unit tests for {@link com.google.cloud.spanner.InstanceAdminClientImpl}. */ @RunWith(JUnit4.class) public class InstanceAdminClientImplTest { private static final String PROJECT_ID = "my-project"; diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionRunnerImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionRunnerImplTest.java index df8245e6acb..e13b7b75093 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionRunnerImplTest.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/TransactionRunnerImplTest.java @@ -73,7 +73,7 @@ import org.mockito.Mockito; import org.mockito.MockitoAnnotations; -/** Unit test for {@link com.google.cloud.spanner.SpannerImpl.TransactionRunnerImpl} */ +/** Unit test for {@link com.google.cloud.spanner.TransactionRunnerImpl} */ @RunWith(JUnit4.class) public class TransactionRunnerImplTest { private static final class TestExecutorFactory diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractSqlScriptVerifier.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractSqlScriptVerifier.java index ec40c8c0d0b..15d6cf65808 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractSqlScriptVerifier.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractSqlScriptVerifier.java @@ -70,9 +70,9 @@ * equal. The value of a variable can be set using a @PUT statement. * * - * The parser can set a temporary variable value using a @PUT statement: - * @PUT 'variable_name'\nSQL statement The SQL statement must be a statement that returns a - * {@link ResultSet} containing exactly one row and one column. + * The parser can set a temporary variable value using a @PUT statement: {@code @PUT + * 'variable_name'\nSQL statement} The SQL statement must be a statement that returns a {@link + * ResultSet} containing exactly one row and one column. * *

In addition the verifier can create new connections if the script contains NEW_CONNECTION; * statements and the verifier has been created with a {@link GenericConnectionProvider}. See {@link @@ -130,7 +130,7 @@ protected abstract static class GenericStatementResult { /** * Generic wrapper around a connection to a database. The underlying connection could be a Spanner - * {@link com.google.cloud.spanner.jdbc.Connection} or a JDBC {@link java.sql.Connection} + * {@link com.google.cloud.spanner.connection.Connection} or a JDBC {@link java.sql.Connection} */ public abstract static class GenericConnection implements AutoCloseable { protected abstract GenericStatementResult execute(String sql) throws Exception; @@ -208,8 +208,8 @@ public AbstractSqlScriptVerifier(GenericConnectionProvider provider) { * Statements without an @EXPECT statement will be executed and its result will be ignored, unless * the statement throws an exception, which will fail the test case. * - *

The {@link com.google.cloud.spanner.jdbc.Connection}s that the statements are executed on - * must be created by a {@link GenericConnectionProvider} + *

The {@link com.google.cloud.spanner.connection.Connection}s that the statements are executed + * on must be created by a {@link GenericConnectionProvider} * * @param filename The file name containing the statements. Statements must be separated by a * semicolon (;) @@ -229,8 +229,8 @@ public void verifyStatementsInFile(String filename, Class resourceClass, bool * Statements without an @EXPECT statement will be executed and its result will be ignored, unless * the statement throws an exception, which will fail the test case. * - *

The {@link com.google.cloud.spanner.jdbc.Connection}s that the statements are executed on - * must be created by a {@link GenericConnectionProvider} + *

The {@link com.google.cloud.spanner.connection.Connection}s that the statements are executed + * on must be created by a {@link GenericConnectionProvider} * * @param filename The file name containing the statements. Statements must be separated by a * semicolon (;) @@ -250,8 +250,8 @@ public void verifyStatementsInFile(String filename, Class resourceClass) thro * Statements without an @EXPECT statement will be executed and its result will be ignored, unless * the statement throws an exception, which will fail the test case. * - * @param providedConnection The {@link com.google.cloud.spanner.jdbc.Connection} to execute the - * statements against + * @param providedConnection The {@link com.google.cloud.spanner.connection.Connection} to execute + * the statements against * @param filename The file name containing the statements. Statements must be separated by a * semicolon (;) * @param resourceClass The class that defines the package where to find the input file @@ -271,8 +271,8 @@ public void verifyStatementsInFile( * Statements without an @EXPECT statement will be executed and its result will be ignored, unless * the statement throws an exception, which will fail the test case. * - * @param providedConnection The {@link com.google.cloud.spanner.jdbc.Connection} to execute the - * statements against + * @param providedConnection The {@link com.google.cloud.spanner.connection.Connection} to execute + * the statements against * @param filename The file name containing the statements. Statements must be separated by a * semicolon (;) * @param resourceClass The class that defines the package where to find the input file diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/SqlScriptVerifier.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/SqlScriptVerifier.java index 15b031705e3..8e88d4a1420 100644 --- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/SqlScriptVerifier.java +++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/SqlScriptVerifier.java @@ -28,7 +28,8 @@ import com.google.cloud.spanner.connection.StatementResult.ResultType; /** - * SQL script verifier implementation for Spanner {@link com.google.cloud.spanner.jdbc.Connection} + * SQL script verifier implementation for Spanner {@link + * com.google.cloud.spanner.connection.Connection} * * @see AbstractSqlScriptVerifier for more information */ From 27e730a2b3323e5899c29d7126a620299882612c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 16:28:14 +0000 Subject: [PATCH 8/9] build(deps): bump cryptography from 39.0.1 to 41.0.2 in /.kokoro (#2529) Bumps [cryptography](https://togithub.com/pyca/cryptography) from 39.0.1 to 41.0.2.

Changelog

Sourced from cryptography's changelog.

41.0.2 - 2023-07-10


* Fixed bugs in creating and parsing SSH certificates where critical options
  with values were handled incorrectly. Certificates are now created correctly
  and parsing accepts correct values as well as the previously generated
  invalid forms with a warning. In the next release, support for parsing these
  invalid forms will be removed.

.. _v41-0-1:

41.0.1 - 2023-06-01

  • Temporarily allow invalid ECDSA signature algorithm parameters in X.509 certificates, which are generated by older versions of Java.
  • Allow null bytes in pass phrases when serializing private keys.

.. _v41-0-0:

41.0.0 - 2023-05-30


* **BACKWARDS INCOMPATIBLE:** Support for OpenSSL less than 1.1.1d has been
  removed.  Users on older version of OpenSSL will need to upgrade.
* **BACKWARDS INCOMPATIBLE:** Support for Python 3.6 has been removed.
* **BACKWARDS INCOMPATIBLE:** Dropped support for LibreSSL < 3.6.
* Updated the minimum supported Rust version (MSRV) to 1.56.0, from 1.48.0.
* Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 3.1.1.
* Added support for the :class:`~cryptography.x509.OCSPAcceptableResponses`
  OCSP extension.
* Added support for the :class:`~cryptography.x509.MSCertificateTemplate`
  proprietary Microsoft certificate extension.
* Implemented support for equality checks on all asymmetric public key types.
* Added support for ``aes256-gcm@openssh.com`` encrypted keys in
  :func:`~cryptography.hazmat.primitives.serialization.load_ssh_private_key`.
* Added support for obtaining X.509 certificate signature algorithm parameters
  (including PSS) via
  :meth:`~cryptography.x509.Certificate.signature_algorithm_parameters`.
* Support signing :class:`~cryptography.hazmat.primitives.asymmetric.padding.PSS`
  X.509 certificates via the new keyword-only argument ``rsa_padding`` on
  :meth:`~cryptography.x509.CertificateBuilder.sign`.
* Added support for
  :class:`~cryptography.hazmat.primitives.ciphers.aead.ChaCha20Poly1305`
  on BoringSSL.

.. _v40-0-2:

40.0.2 - 2023-04-14

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cryptography&package-manager=pip&previous-version=39.0.1&new-version=41.0.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://togithub.com/googleapis/java-spanner/network/alerts).
From d05325b6fcfb82008244c42a84a559e5e7a88b25 Mon Sep 17 00:00:00 2001 From: Arpan Mishra Date: Fri, 21 Jul 2023 15:05:54 +0530 Subject: [PATCH 9/9] fix: add doc error as required check. --- .github/sync-repo-settings.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index b712292013b..a6177d5b0ef 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -10,6 +10,7 @@ branchProtectionRules: requiredStatusCheckContexts: - dependencies (17) - lint + - javadoc - units (8) - units (11) - 'Kokoro - Test: Integration' @@ -28,6 +29,7 @@ branchProtectionRules: requiredStatusCheckContexts: - dependencies (11) - lint + - javadoc - units (7) - units (8) - units (11) @@ -42,6 +44,7 @@ branchProtectionRules: requiredStatusCheckContexts: - dependencies (11) - lint + - javadoc - units (7) - units (8) - units (11) @@ -56,6 +59,7 @@ branchProtectionRules: requiredStatusCheckContexts: - dependencies (11) - lint + - javadoc - units (7) - units (8) - units (11) @@ -69,6 +73,7 @@ branchProtectionRules: requiresStrictStatusChecks: false requiredStatusCheckContexts: - lint + - javadoc - units (8) - units (11) - 'Kokoro - Test: Integration' @@ -81,6 +86,7 @@ branchProtectionRules: requiresStrictStatusChecks: false requiredStatusCheckContexts: - lint + - javadoc - units (8) - units (11) - 'Kokoro - Test: Integration' @@ -95,6 +101,7 @@ branchProtectionRules: requiresStrictStatusChecks: false requiredStatusCheckContexts: - lint + - javadoc - units (8) - units (11) - 'Kokoro - Test: Integration' @@ -109,6 +116,7 @@ branchProtectionRules: requiresStrictStatusChecks: false requiredStatusCheckContexts: - lint + - javadoc - units (8) - units (11) - 'Kokoro - Test: Integration'