• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..22-Sep-2020-

admin/H22-Sep-2020-5,7774,064

apiv1/H22-Sep-2020-2,5011,815

internal/H22-Sep-2020-2,7122,181

spannertest/H22-Sep-2020-4,9663,954

spansql/H22-Sep-2020-4,5233,498

CHANGES.mdH A D22-Sep-202010.5 KiB243215

README.mdH A D22-Sep-2020924 3429

batch.goH A D22-Sep-202011.6 KiB380269

batch_test.goH A D22-Sep-20204.1 KiB171135

big_pdml_test.goH A D22-Sep-20201.7 KiB6134

client.goH A D22-Sep-202016.9 KiB524339

client_benchmarks_test.goH A D22-Sep-202012.2 KiB419344

client_test.goH A D22-Sep-202069 KiB2,1411,899

cmp_test.goH A D22-Sep-20201.8 KiB6139

doc.goH A D22-Sep-202011.8 KiB3601

emulator_test.shH A D22-Sep-20201.5 KiB4719

errors.goH A D22-Sep-20205.9 KiB197123

errors112.goH A D22-Sep-20201.2 KiB348

errors113.goH A D22-Sep-20201.2 KiB348

errors_test.goH A D22-Sep-20204.3 KiB10479

examples_test.goH A D22-Sep-202019.7 KiB770603

go.modH A D22-Sep-2020470 1714

go.sumH A D22-Sep-202051.3 KiB533532

go_mod_tidy_hack.goH A D22-Sep-2020918 232

integration_test.goH A D22-Sep-202097.3 KiB3,2052,740

key.goH A D22-Sep-202012.6 KiB433213

key_test.goH A D22-Sep-202012 KiB473440

mutation.goH A D22-Sep-202013.9 KiB433219

mutation_test.goH A D22-Sep-202015.9 KiB571516

oc_test.goH A D22-Sep-20207.4 KiB277223

pdml.goH A D22-Sep-20204.5 KiB12578

pdml_test.goH A D22-Sep-20205 KiB169134

protoutils.goH A D22-Sep-20203.2 KiB12379

read.goH A D22-Sep-202025.2 KiB786498

read_test.goH A D22-Sep-202049.7 KiB1,7741,540

retry.goH A D22-Sep-20204.6 KiB155102

retry_test.goH A D22-Sep-20202.9 KiB9168

row.goH A D22-Sep-202010.3 KiB309162

row_test.goH A D22-Sep-202048.3 KiB1,7671,583

session.goH A D22-Sep-202053.9 KiB1,7011,132

session_test.goH A D22-Sep-202060.4 KiB1,9691,515

sessionclient.goH A D22-Sep-202011.1 KiB308205

sessionclient_test.goH A D22-Sep-202014.3 KiB452381

statement.goH A D22-Sep-20202.9 KiB9452

statement_test.goH A D22-Sep-20207.2 KiB207168

stats.goH A D22-Sep-20205.4 KiB170106

timestampbound.goH A D22-Sep-20208.8 KiB243107

timestampbound_test.goH A D22-Sep-20205.9 KiB207169

transaction.goH A D22-Sep-202038.3 KiB1,208791

transaction_test.goH A D22-Sep-202019.3 KiB624500

value.goH A D22-Sep-202080.7 KiB3,1332,708

value_benchmarks_test.goH A D22-Sep-20205.7 KiB233197

value_test.goH A D22-Sep-202092.5 KiB2,5862,344

README.md

1## Cloud Spanner [![GoDoc](https://godoc.org/cloud.google.com/go/spanner?status.svg)](https://godoc.org/cloud.google.com/go/spanner)
2
3- [About Cloud Spanner](https://cloud.google.com/spanner/)
4- [API documentation](https://cloud.google.com/spanner/docs)
5- [Go client documentation](https://godoc.org/cloud.google.com/go/spanner)
6
7### Example Usage
8
9First create a `spanner.Client` to use throughout your application:
10
11[snip]:# (spanner-1)
12```go
13client, err := spanner.NewClient(ctx, "projects/P/instances/I/databases/D")
14if err != nil {
15	log.Fatal(err)
16}
17```
18
19[snip]:# (spanner-2)
20```go
21// Simple Reads And Writes
22_, err = client.Apply(ctx, []*spanner.Mutation{
23	spanner.Insert("Users",
24		[]string{"name", "email"},
25		[]interface{}{"alice", "a@example.com"})})
26if err != nil {
27	log.Fatal(err)
28}
29row, err := client.Single().ReadRow(ctx, "Users",
30	spanner.Key{"alice"}, []string{"email"})
31if err != nil {
32	log.Fatal(err)
33}
34```