File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
samples/snippets/src/main/java/com/example/spanner Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -57,13 +57,13 @@ implementation 'com.google.cloud:google-cloud-spanner'
5757If you are using Gradle without BOM, add this to your dependencies:
5858
5959``` Groovy
60- implementation 'com.google.cloud:google-cloud-spanner:6.42.0 '
60+ implementation 'com.google.cloud:google-cloud-spanner:6.42.1 '
6161```
6262
6363If you are using SBT, add this to your dependencies:
6464
6565``` Scala
66- libraryDependencies += " com.google.cloud" % " google-cloud-spanner" % " 6.42.0 "
66+ libraryDependencies += " com.google.cloud" % " google-cloud-spanner" % " 6.42.1 "
6767```
6868<!-- {x-version-update-end} -->
6969
@@ -412,7 +412,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
412412[ kokoro-badge-link-5 ] : http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java11.html
413413[ stability-image ] : https://img.shields.io/badge/stability-stable-green
414414[ maven-version-image ] : https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-spanner.svg
415- [ maven-version-link ] : https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.42.0
415+ [ maven-version-link ] : https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.42.1
416416[ authentication ] : https://github.com/googleapis/google-cloud-java#authentication
417417[ auth-scopes ] : https://developers.google.com/identity/protocols/oauth2/scopes
418418[ predefined-iam-roles ] : https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Original file line number Diff line number Diff line change 1919import com .google .cloud .spanner .BatchClient ;
2020import com .google .cloud .spanner .BatchReadOnlyTransaction ;
2121import com .google .cloud .spanner .DatabaseId ;
22+ import com .google .cloud .spanner .Options ;
2223import com .google .cloud .spanner .Partition ;
2324import com .google .cloud .spanner .PartitionOptions ;
2425import com .google .cloud .spanner .ResultSet ;
@@ -76,10 +77,15 @@ public static void main(String[] args) throws InterruptedException {
7677 batchClient .batchReadOnlyTransaction (TimestampBound .strong ());
7778
7879 // A Partition object is serializable and can be used from a different process.
80+ // DataBoost option is an optional parameter which can be used for partition read
81+ // and query to execute the request via spanner independent compute resources.
82+
7983 List <Partition > partitions =
8084 txn .partitionQuery (
8185 PartitionOptions .getDefaultInstance (),
82- Statement .of ("SELECT SingerId, FirstName, LastName FROM Singers" ));
86+ Statement .of ("SELECT SingerId, FirstName, LastName FROM Singers" ),
87+ // Option to enable data boost for a given request
88+ Options .dataBoostEnabled (true ));
8389
8490 totalPartitions = partitions .size ();
8591
You can’t perform that action at this time.
0 commit comments