Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit f7f9f72

Browse files
committed
Merge branch 'master' into lenient-mode
2 parents 5cb6bb1 + 9f559d8 commit f7f9f72

17 files changed

Lines changed: 362 additions & 27 deletions

File tree

.github/generated-files-bot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ externalManifests:
55
- type: json
66
file: '.github/readme/synth.metadata/synth.metadata'
77
jsonpath: '$.generatedFiles[*]'
8+
ignoreAuthors:
9+
- 'renovate-bot'
10+
- 'yoshi-automation'
11+
- 'release-please[bot]'

.github/readme/synth.metadata/synth.metadata

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/java-spanner-jdbc.git",
7-
"sha": "35d0936d769fea9c46216dce009a3cc78a4d9eba"
7+
"sha": "bf2cdae2b42d3b3c3bc5bb01deee3a32e66ebd0e"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "synthtool",
1313
"remote": "https://github.com/googleapis/synthtool.git",
14-
"sha": "39b7149da4026765385403632db3c6f63db96b2c"
14+
"sha": "41e998d5afdc2c2143a23c9b044b9931936f7318"
1515
}
1616
}
1717
]

.kokoro/release/publish_javadoc.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ python3 -m pip install gcp-docuploader
3838
# compile all packages
3939
mvn clean install -B -q -DskipTests=true
4040

41-
NAME=google-cloud-spanner-jdbc
42-
VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3)
41+
export NAME=google-cloud-spanner-jdbc
42+
export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3)
4343

4444
# build the docs
4545
mvn site -B -q
@@ -59,7 +59,8 @@ python3 -m docuploader upload . \
5959

6060
popd
6161

62-
# V2
62+
# V2 due to problems w/ the released javadoc plugin doclava, Java 8 is required. Beware of accidental updates.
63+
6364
mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/"
6465

6566
pushd target/devsite/reference

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,48 @@
11
# Changelog
22

3+
### [1.18.3](https://www.github.com/googleapis/java-spanner-jdbc/compare/v1.18.2...v1.18.3) (2020-12-16)
4+
5+
6+
### Dependencies
7+
8+
* update spanner to 3.1.2 ([#306](https://www.github.com/googleapis/java-spanner-jdbc/issues/306)) ([596e8ed](https://www.github.com/googleapis/java-spanner-jdbc/commit/596e8ed01dc8ffc01c37b233f688d163b8693f85))
9+
10+
### [1.18.2](https://www.github.com/googleapis/java-spanner-jdbc/compare/v1.18.1...v1.18.2) (2020-12-16)
11+
12+
13+
### Dependencies
14+
15+
* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.17.0 ([#302](https://www.github.com/googleapis/java-spanner-jdbc/issues/302)) ([9a2efa1](https://www.github.com/googleapis/java-spanner-jdbc/commit/9a2efa14ad402130ca542d5b8b9f9bbb58587404))
16+
17+
### [1.18.1](https://www.github.com/googleapis/java-spanner-jdbc/compare/v1.18.0...v1.18.1) (2020-12-14)
18+
19+
20+
### Dependencies
21+
22+
* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.1 ([5d5e5fc](https://www.github.com/googleapis/java-spanner-jdbc/commit/5d5e5fccef229e4edd9d34a93553a85a1e97b14f))
23+
24+
## [1.18.0](https://www.github.com/googleapis/java-spanner-jdbc/compare/v1.17.3...v1.18.0) (2020-12-10)
25+
26+
27+
### Features
28+
29+
* expose more methods from Connection in JDBC ([#255](https://www.github.com/googleapis/java-spanner-jdbc/issues/255)) ([697837c](https://www.github.com/googleapis/java-spanner-jdbc/commit/697837ce0ce646a9ca45a0afc3a2e1e368c712f7)), closes [#253](https://www.github.com/googleapis/java-spanner-jdbc/issues/253)
30+
* report whether column is generated in JDBC metadata ([#291](https://www.github.com/googleapis/java-spanner-jdbc/issues/291)) ([9aa9a1f](https://www.github.com/googleapis/java-spanner-jdbc/commit/9aa9a1f8f673554ae71e78937007166f220dd255)), closes [#290](https://www.github.com/googleapis/java-spanner-jdbc/issues/290)
31+
32+
33+
### Documentation
34+
35+
* add connection example to readme ([#281](https://www.github.com/googleapis/java-spanner-jdbc/issues/281)) ([00314e6](https://www.github.com/googleapis/java-spanner-jdbc/commit/00314e643ee6570ed6025630616ad0df70789447))
36+
* fix product docs link ([#282](https://www.github.com/googleapis/java-spanner-jdbc/issues/282)) ([0065a9b](https://www.github.com/googleapis/java-spanner-jdbc/commit/0065a9b319b09e71bf285f85c33514442a163dea))
37+
38+
39+
### Dependencies
40+
41+
* do not re-declare grpc dependencies as test dependencies ([#278](https://www.github.com/googleapis/java-spanner-jdbc/issues/278)) ([4bc59f8](https://www.github.com/googleapis/java-spanner-jdbc/commit/4bc59f8d7f27cee0bbc54b91271e2aadd7cb31da))
42+
* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.0 ([#286](https://www.github.com/googleapis/java-spanner-jdbc/issues/286)) ([2d804f5](https://www.github.com/googleapis/java-spanner-jdbc/commit/2d804f5b52271356598588764c77d1a13f3b7183))
43+
* update dependency com.google.cloud:google-cloud-spanner-bom to v3 ([#260](https://www.github.com/googleapis/java-spanner-jdbc/issues/260)) ([40cdbc0](https://www.github.com/googleapis/java-spanner-jdbc/commit/40cdbc01c91c153c8c3fd36cf7bf91d80b187f03))
44+
* update dependency com.google.cloud:google-cloud-spanner-bom to v3.0.5 ([#287](https://www.github.com/googleapis/java-spanner-jdbc/issues/287)) ([9cef4d5](https://www.github.com/googleapis/java-spanner-jdbc/commit/9cef4d57f6b63caba71ba77160677f73569a8fea))
45+
346
### [1.17.3](https://www.github.com/googleapis/java-spanner-jdbc/compare/v1.17.2...v1.17.3) (2020-11-17)
447

548

README.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ If you are using Maven, add this to your pom.xml file:
1717
<dependency>
1818
<groupId>com.google.cloud</groupId>
1919
<artifactId>google-cloud-spanner-jdbc</artifactId>
20-
<version>1.17.3</version>
20+
<version>1.18.2</version>
2121
</dependency>
2222
```
2323

2424
If you are using Gradle, add this to your dependencies
2525
```Groovy
26-
compile 'com.google.cloud:google-cloud-spanner-jdbc:1.17.3'
26+
compile 'com.google.cloud:google-cloud-spanner-jdbc:1.18.2'
2727
```
2828
If you are using SBT, add this to your dependencies
2929
```Scala
30-
libraryDependencies += "com.google.cloud" % "google-cloud-spanner-jdbc" % "1.17.3"
30+
libraryDependencies += "com.google.cloud" % "google-cloud-spanner-jdbc" % "1.18.2"
3131
```
3232

3333
## Authentication
@@ -58,6 +58,31 @@ See the [Google Cloud Spanner JDBC client library docs][javadocs] to learn how t
5858
use this Google Cloud Spanner JDBC Client Library.
5959

6060

61+
### Creating a JDBC Connection
62+
63+
The following example shows how to create a JDBC connection to Cloud Spanner and execute a simple query.
64+
65+
```java
66+
String projectId = "my-project";
67+
String instanceId = "my-instance";
68+
String databaseId = "my-database";
69+
70+
try (Connection connection =
71+
DriverManager.getConnection(
72+
String.format(
73+
"jdbc:cloudspanner:/projects/%s/instances/%s/databases/%s",
74+
projectId, instanceId, databaseId))) {
75+
try (Statement statement = connection.createStatement()) {
76+
try (ResultSet rs = statement.executeQuery("SELECT CURRENT_TIMESTAMP()")) {
77+
while (rs.next()) {
78+
System.out.printf(
79+
"Connected to Cloud Spanner at [%s]%n", rs.getTimestamp(1).toString());
80+
}
81+
}
82+
}
83+
}
84+
```
85+
6186

6287

6388

@@ -101,7 +126,9 @@ Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3]
101126
Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4]
102127
Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5]
103128

104-
[product-docs]: https://cloud.google.com/pubsub/docs/
129+
Java is a registered trademark of Oracle and/or its affiliates.
130+
131+
[product-docs]: https://cloud.google.com/spanner/docs/use-oss-jdbc
105132
[javadocs]: https://googleapis.dev/java/google-cloud-spanner-jdbc/latest/index.html
106133
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner-jdbc/java7.svg
107134
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner-jdbc/java7.html

clirr-ignored-differences.xml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,56 @@
4242
<differenceType>8001</differenceType>
4343
<className>com/google/cloud/spanner/jdbc/UnitOfWork$UnitOfWorkState</className>
4444
</difference>
45+
46+
<!-- Expose more methods from Connection API in CloudSpannerJdbcConnection -->
47+
<difference>
48+
<differenceType>7012</differenceType>
49+
<className>com/google/cloud/spanner/jdbc/CloudSpannerJdbcConnection</className>
50+
<method>com.google.cloud.spanner.connection.AutocommitDmlMode getAutocommitDmlMode()</method>
51+
</difference>
52+
<difference>
53+
<differenceType>7012</differenceType>
54+
<className>com/google/cloud/spanner/jdbc/CloudSpannerJdbcConnection</className>
55+
<method>java.lang.String getOptimizerVersion()</method>
56+
</difference>
57+
<difference>
58+
<differenceType>7012</differenceType>
59+
<className>com/google/cloud/spanner/jdbc/CloudSpannerJdbcConnection</className>
60+
<method>com.google.cloud.spanner.TimestampBound getReadOnlyStaleness()</method>
61+
</difference>
62+
<difference>
63+
<differenceType>7012</differenceType>
64+
<className>com/google/cloud/spanner/jdbc/CloudSpannerJdbcConnection</className>
65+
<method>com.google.cloud.spanner.connection.TransactionMode getTransactionMode()</method>
66+
</difference>
67+
<difference>
68+
<differenceType>7012</differenceType>
69+
<className>com/google/cloud/spanner/jdbc/CloudSpannerJdbcConnection</className>
70+
<method>boolean isInTransaction()</method>
71+
</difference>
72+
<difference>
73+
<differenceType>7012</differenceType>
74+
<className>com/google/cloud/spanner/jdbc/CloudSpannerJdbcConnection</className>
75+
<method>boolean isTransactionStarted()</method>
76+
</difference>
77+
<difference>
78+
<differenceType>7012</differenceType>
79+
<className>com/google/cloud/spanner/jdbc/CloudSpannerJdbcConnection</className>
80+
<method>void setAutocommitDmlMode(com.google.cloud.spanner.connection.AutocommitDmlMode)</method>
81+
</difference>
82+
<difference>
83+
<differenceType>7012</differenceType>
84+
<className>com/google/cloud/spanner/jdbc/CloudSpannerJdbcConnection</className>
85+
<method>void setOptimizerVersion(java.lang.String)</method>
86+
</difference>
87+
<difference>
88+
<differenceType>7012</differenceType>
89+
<className>com/google/cloud/spanner/jdbc/CloudSpannerJdbcConnection</className>
90+
<method>void setReadOnlyStaleness(com.google.cloud.spanner.TimestampBound)</method>
91+
</difference>
92+
<difference>
93+
<differenceType>7012</differenceType>
94+
<className>com/google/cloud/spanner/jdbc/CloudSpannerJdbcConnection</className>
95+
<method>void setTransactionMode(com.google.cloud.spanner.connection.TransactionMode)</method>
96+
</difference>
4597
</differences>

pom.xml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66
<artifactId>google-cloud-spanner-jdbc</artifactId>
7-
<version>1.17.3</version><!-- {x-version-update:google-cloud-spanner-jdbc:current} -->
7+
<version>1.18.3</version><!-- {x-version-update:google-cloud-spanner-jdbc:current} -->
88
<packaging>jar</packaging>
99
<name>Google Cloud Spanner JDBC</name>
1010
<url>https://github.com/googleapis/java-spanner-jdbc</url>
@@ -71,14 +71,14 @@
7171
<dependency>
7272
<groupId>com.google.cloud</groupId>
7373
<artifactId>google-cloud-spanner-bom</artifactId>
74-
<version>3.0.5</version>
74+
<version>3.1.2</version>
7575
<type>pom</type>
7676
<scope>import</scope>
7777
</dependency>
7878
<dependency>
7979
<groupId>com.google.cloud</groupId>
8080
<artifactId>google-cloud-shared-dependencies</artifactId>
81-
<version>0.16.0</version>
81+
<version>0.17.0</version>
8282
<type>pom</type>
8383
<scope>import</scope>
8484
</dependency>
@@ -105,6 +105,11 @@
105105
<groupId>com.google.cloud</groupId>
106106
<artifactId>google-cloud-spanner</artifactId>
107107
</dependency>
108+
<!-- TODO: Remove grpc-alts from here once it has been removed as a runtime dependency from java-spanner -->
109+
<dependency>
110+
<groupId>io.grpc</groupId>
111+
<artifactId>grpc-alts</artifactId>
112+
</dependency>
108113
<dependency>
109114
<groupId>com.google.protobuf</groupId>
110115
<artifactId>protobuf-java</artifactId>
@@ -145,10 +150,6 @@
145150
<groupId>com.google.api.grpc</groupId>
146151
<artifactId>proto-google-cloud-spanner-v1</artifactId>
147152
</dependency>
148-
<dependency>
149-
<groupId>com.google.api.grpc</groupId>
150-
<artifactId>proto-google-cloud-spanner-v1</artifactId>
151-
</dependency>
152153

153154
<!-- Test dependencies -->
154155
<dependency>
@@ -295,6 +296,8 @@
295296
<artifactId>maven-dependency-plugin</artifactId>
296297
<configuration>
297298
<ignoredUnusedDeclaredDependencies>
299+
<!-- TODO: Remove grpc-alts from ignored list once it has been removed from java-spanner -->
300+
<ignoredDependency>io.grpc:grpc-alts</ignoredDependency>
298301
<ignoredDependency>com.google.api:gax-grpc</ignoredDependency>
299302
<ignoredDependency>com.google.cloud:google-cloud-core-grpc</ignoredDependency>
300303
<ignoredDependency>com.google.api.grpc:grpc-google-cloud-spanner-v1</ignoredDependency>

samples/install-without-bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<dependency>
3030
<groupId>com.google.cloud</groupId>
3131
<artifactId>google-cloud-spanner-jdbc</artifactId>
32-
<version>1.17.3</version>
32+
<version>1.18.2</version>
3333
</dependency>
3434
<!-- [END spanner-jdbc_install_without_bom] -->
3535

samples/snapshot/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<dependency>
2929
<groupId>com.google.cloud</groupId>
3030
<artifactId>google-cloud-spanner-jdbc</artifactId>
31-
<version>1.17.3</version>
31+
<version>1.18.3</version>
3232
</dependency>
3333
<!-- {x-version-update-end} -->
3434

samples/snippets/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<dependency>
3131
<groupId>com.google.cloud</groupId>
3232
<artifactId>libraries-bom</artifactId>
33-
<version>16.1.0</version>
33+
<version>16.2.0</version>
3434
<type>pom</type>
3535
<scope>import</scope>
3636
</dependency>

0 commit comments

Comments
 (0)