X Tutup
Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Getting Started with Cloud Spanner and the Google Cloud Client libraries

Open in Cloud Shell

Cloud Spanner is a horizontally-scalable database-as-a-service with transactions and SQL support. These sample Java applications demonstrate how to access the Spanner API using the Google Cloud Client Library for Java.

Quickstart

Install Maven.

Build your project from the root directory (java-spanner):

mvn clean package -DskipTests
cd samples/snippets
mvn package

Every subsequent command here should be run from a subdirectory samples/snippets.

Running samples

Usage:

java -jar target/spanner-snippets/spanner-google-cloud-samples.jar operation my-instance my-database

Examples

Create Database:

java -jar target/spanner-google-cloud-samples-jar-with-dependencies.jar my-instance my-database

Listing database operations:

java -jar target/spanner-snippets/spanner-google-cloud-samples.jar listdatabaseoperations my-instance my-database
X Tutup