1- # Google Cloud Java Client for Spanner
1+ # Google Cloud Spanner Client for Java
22
3- Java idiomatic client for [ Cloud Spanner] [ cloud-spanner ] .
3+ Java idiomatic client for [ Cloud Spanner] [ product-docs ] .
44
5- [ ![ Kokoro CI] ( http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.svg )] ( http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.html )
6- [ ![ Maven] ( https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-spanner.svg )] ( https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-spanner.svg )
7- [ ![ Codacy Badge] ( https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917 )] ( https://www.codacy.com/app/mziccard/google-cloud-java )
5+ [ ![ Maven] [ maven-version-image ]] [ maven-version-link ]
6+ ![ Stability] [ stability-image ]
87
9- - [ Product Documentation] [ spanner- product-docs]
10- - [ Client Library Documentation] [ spanner-client-lib-docs ]
8+ - [ Product Documentation] [ product-docs ]
9+ - [ Client Library Documentation] [ javadocs ]
1110
1211## Quickstart
13- If you are using Maven with a BOM, add this to your pom.xml file.
12+
13+ If you are using Maven with [ BOM] [ libraries-bom ] , add this to your pom.xml file
1414``` xml
1515<dependencyManagement >
16- <dependencies >
16+ <dependencies >
17+ <dependency >
18+ <groupId >com.google.cloud</groupId >
19+ <artifactId >libraries-bom</artifactId >
20+ <version >5.1.0</version >
21+ <type >pom</type >
22+ <scope >import</scope >
23+ </dependency >
24+ </dependencies >
25+ </dependencyManagement >
26+
27+ <dependencies >
1728 <dependency >
1829 <groupId >com.google.cloud</groupId >
19- <artifactId >libraries-bom</artifactId >
20- <version >3.0.0</version >
21- <type >pom</type >
22- <scope >import</scope >
23- </dependency >
24- </dependencies >
25- </dependencyManagement >
30+ <artifactId >google-cloud-spanner</artifactId >
31+ </dependency >
2632
27- <dependency >
28- <groupId >com.google.cloud</groupId >
29- <artifactId >google-cloud-spanner</artifactId >
30- </dependency >
3133```
32- [ // ] : # ( {x-version-update-start:google-cloud-spanner:released} )
33- If you are using Maven without a BOM, add this to your dependencies.
34+
35+ If you are using Maven without BOM, add this to your dependencies:
36+
3437``` xml
3538<dependency >
3639 <groupId >com.google.cloud</groupId >
3740 <artifactId >google-cloud-spanner</artifactId >
38- <version >1.53 .0</version >
41+ <version >1.52 .0</version >
3942</dependency >
43+
4044```
45+
46+ [ // ] : # ( {x-version-update-start:google-cloud-spanner:released} )
47+
4148If you are using Gradle, add this to your dependencies
4249``` Groovy
4350compile 'com.google.cloud:google-cloud-spanner:1.53.0'
@@ -50,27 +57,37 @@ libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "1.53.0"
5057
5158## Authentication
5259
53- See the
54- [ Authentication] ( https://github.com/googleapis/google-cloud-java#authentication )
55- section in the base directory's README.
60+ See the [ Authentication] [ authentication ] section in the base directory's README.
61+
62+ ## Getting Started
63+
64+ ### Prerequisites
65+
66+ You will need a [ Google Cloud Platform Console] [ developer-console ] project with the Cloud Spanner [ API enabled] [ enable-api ] .
67+ You will need to [ enable billing] [ enable-billing ] to use Google Cloud Spanner.
68+ [ Follow these instructions] [ create-project ] to get your project set up. You will also need to set up the local development environment by
69+ [ installing the Google Cloud SDK] [ cloud-sdk ] and running the following commands in command line:
70+ ` gcloud auth login ` and ` gcloud config set project [YOUR PROJECT ID] ` .
71+
72+ ### Installation and setup
73+
74+ You'll need to obtain the ` google-cloud-spanner ` library. See the [ Quickstart] ( #quickstart ) section
75+ to add ` google-cloud-spanner ` as a dependency in your code.
5676
5777## About Cloud Spanner
5878
59- [ Cloud Spanner] [ cloud-spanner ] is a fully managed, mission-critical,
79+
80+ [ Cloud Spanner] [ product-docs ] is a fully managed, mission-critical,
6081relational database service that offers transactional consistency at global scale,
6182schemas, SQL (ANSI 2011 with extensions), and automatic, synchronous replication
6283for high availability.
6384
6485Be sure to activate the Cloud Spanner API on the Developer's Console to
6586use Cloud Spanner from your project.
6687
67- See the [ Spanner client lib docs] [ spanner-client-lib-docs ] to learn how to
68- interact with Cloud Spanner using this Client Library.
88+ See the [ Cloud Spanner client library docs] [ javadocs ] to learn how to
89+ use this Cloud Spanner Client Library.
6990
70- ## Getting Started
71- #### Prerequisites
72- Please refer to the [ getting
73- started] ( https://cloud.google.com/spanner/docs/getting-started/java/ ) guide.
7491
7592#### Calling Cloud Spanner
7693Here is a code snippet showing a simple usage example. Add the following imports
@@ -112,48 +129,79 @@ try {
112129
113130#### Complete source code
114131
115- In [ DatabaseSelect.java] ( ../.. /google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/DatabaseSelect.java) we put together all the code shown above in a single program.
132+ In [ DatabaseSelect.java] ( https://github.com/googleapis/google-cloud-java/tree/master /google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/DatabaseSelect.java) we put together all the code shown above in a single program.
116133
117- ## Troubleshooting
118134
119- To get help, follow the instructions in the [ shared Troubleshooting
120- document] ( https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting ) .
121135
122- Transport
123- ---------
124- Spanner uses gRPC for the transport layer.
125136
126- ## Java Versions
127137
128- Java 7 or above is required for using this client.
138+ ## Troubleshooting
129139
130- ## Testing
140+ To get help, follow the instructions in the [ shared Troubleshooting document ] [ troubleshooting ] .
131141
132- This library has tools to help make tests for code using Cloud Spanner.
142+ ## Transport
133143
134- See [ TESTING] to read more about testing.
144+ Cloud Spanner uses gRPC for the transport layer.
145+
146+ ## Java Versions
147+
148+ Java 7 or above is required for using this client.
135149
136150## Versioning
137151
152+
138153This library follows [ Semantic Versioning] ( http://semver.org/ ) .
139154
140- It is currently in major version zero (` 0.y.z ` ), which means that anything may
141- change at any time and the public API should not be considered stable.
142155
143156## Contributing
144157
158+
145159Contributions to this library are always welcome and highly encouraged.
146160
147- See [ CONTRIBUTING] for more information on how to get started.
161+ See [ CONTRIBUTING] [ contributing ] for more information how to get started.
148162
149- ## License
163+ Please note that this project is released with a Contributor Code of Conduct. By participating in
164+ this project you agree to abide by its terms. See [ Code of Conduct] [ code-of-conduct ] for more
165+ information.
150166
151- Apache 2.0 - See [ LICENSE ] for more information.
167+ ## License
152168
153- [ CONTRIBUTING ] :https://github.com/googleapis/google-cloud-java/blob/master/CONTRIBUTING.md
154- [ LICENSE ] : https://github.com/googleapis/google-cloud-java/blob/master/LICENSE
155- [ TESTING ] : https://github.com/googleapis/google-cloud-java/blob/master/TESTING.md#testing-code-that-uses-cloud-spanner
156- [ cloud-platform ] : https://cloud.google.com/
157- [ cloud-spanner ] : https://cloud.google.com/spanner/
158- [ spanner-product-docs ] : https://cloud.google.com/spanner/docs/
159- [ spanner-client-lib-docs ] : https://googleapis.dev/java/google-cloud-clients/latest/index.html?com/google/cloud/spanner/package-summary.html
169+ Apache 2.0 - See [ LICENSE] [ license ] for more information.
170+
171+ ## CI Status
172+
173+ Java Version | Status
174+ ------------ | ------
175+ Java 7 | [ ![ Kokoro CI] [ kokoro-badge-image-1 ]] [ kokoro-badge-link-1 ]
176+ Java 8 | [ ![ Kokoro CI] [ kokoro-badge-image-2 ]] [ kokoro-badge-link-2 ]
177+ Java 8 OSX | [ ![ Kokoro CI] [ kokoro-badge-image-3 ]] [ kokoro-badge-link-3 ]
178+ Java 8 Windows | [ ![ Kokoro CI] [ kokoro-badge-image-4 ]] [ kokoro-badge-link-4 ]
179+ Java 11 | [ ![ Kokoro CI] [ kokoro-badge-image-5 ]] [ kokoro-badge-link-5 ]
180+
181+ [ product-docs ] : https://cloud.google.com/spanner/docs/
182+ [ javadocs ] : https://googleapis.dev/java/google-cloud-spanner/latest/
183+ [ kokoro-badge-image-1 ] : http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java7.svg
184+ [ kokoro-badge-link-1 ] : http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java7.html
185+ [ kokoro-badge-image-2 ] : http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java8.svg
186+ [ kokoro-badge-link-2 ] : http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java8.html
187+ [ kokoro-badge-image-3 ] : http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java8-osx.svg
188+ [ kokoro-badge-link-3 ] : http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java8-osx.html
189+ [ kokoro-badge-image-4 ] : http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java8-win.svg
190+ [ kokoro-badge-link-4 ] : http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java8-win.html
191+ [ kokoro-badge-image-5 ] : http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java11.svg
192+ [ kokoro-badge-link-5 ] : http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java11.html
193+ [ stability-image ] : https://img.shields.io/badge/stability-ga-green
194+ [ maven-version-image ] : https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-spanner.svg
195+ [ maven-version-link ] : https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-spanner&core=gav
196+ [ authentication ] : https://github.com/googleapis/google-cloud-java#authentication
197+ [ developer-console ] : https://console.developers.google.com/
198+ [ create-project ] : https://cloud.google.com/resource-manager/docs/creating-managing-projects
199+ [ cloud-sdk ] : https://cloud.google.com/sdk/
200+ [ troubleshooting ] : https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting
201+ [ contributing ] : https://github.com/googleapis/java-spanner/blob/master/CONTRIBUTING.md
202+ [ code-of-conduct ] : https://github.com/googleapis/java-spanner/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct
203+ [ license ] : https://github.com/googleapis/java-spanner/blob/master/LICENSE
204+ [ enable-billing ] : https://cloud.google.com/apis/docs/getting-started#enabling_billing
205+ [ enable-api ] : https://console.cloud.google.com/flows/enableapi?apiid=spanner.googleapis.com
206+ [ libraries-bom ] : https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
207+ [ shell_img ] : https://gstatic.com/cloudssh/images/open-btn.png
0 commit comments