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

..02-Sep-2021-

admin/H02-Sep-2021-6,3724,460

apiv1/H02-Sep-2021-2,7962,011

internal/H02-Sep-2021-2,7252,193

spannertest/H02-Sep-2021-6,3685,117

spansql/H02-Sep-2021-6,2194,914

CHANGES.mdH A D02-Sep-202129.7 KiB462347

README.mdH A D02-Sep-2021933 3429

batch.goH A D02-Sep-202113 KiB400279

batch_test.goH A D02-Sep-20214.2 KiB173137

big_pdml_test.goH A D02-Sep-20211.7 KiB6234

client.goH A D02-Sep-202119.1 KiB571366

client_benchmarks_test.goH A D02-Sep-202112.2 KiB419344

client_test.goH A D02-Sep-202192.2 KiB2,8462,507

cmp_test.goH A D02-Sep-20212 KiB6745

doc.goH A D02-Sep-202112 KiB3632

emulator_test.shH A D02-Sep-20211.5 KiB4719

errors.goH A D02-Sep-20216.3 KiB204123

errors112.goH A D02-Sep-20211.2 KiB358

errors113.goH A D02-Sep-20211.2 KiB358

errors_test.goH A D02-Sep-20214.3 KiB10479

examples_test.goH A D02-Sep-202119.7 KiB770603

go.modH A D02-Sep-2021439 1714

go.sumH A D02-Sep-202152.4 KiB536535

go_mod_tidy_hack.goH A D02-Sep-2021937 242

integration_test.goH A D02-Sep-2021112.5 KiB3,6613,136

key.goH A D02-Sep-202112.7 KiB436216

key_test.goH A D02-Sep-202112.4 KiB489456

mutation.goH A D02-Sep-202114 KiB435219

mutation_test.goH A D02-Sep-202117.2 KiB621564

oc_test.goH A D02-Sep-20217.7 KiB288234

pdml.goH A D02-Sep-20214.6 KiB12679

pdml_test.goH A D02-Sep-20215.4 KiB181144

protoutils.goH A D02-Sep-20213.3 KiB12782

read.goH A D02-Sep-202125.7 KiB798507

read_test.goH A D02-Sep-202149.9 KiB1,7841,551

retry.goH A D02-Sep-20214.6 KiB155102

retry_test.goH A D02-Sep-20212.9 KiB9168

row.goH A D02-Sep-202110.5 KiB316165

row_test.goH A D02-Sep-202149.2 KiB1,7931,605

session.goH A D02-Sep-202155.1 KiB1,7271,142

session_test.goH A D02-Sep-202161.3 KiB1,9901,527

sessionclient.goH A D02-Sep-202111.1 KiB308205

sessionclient_test.goH A D02-Sep-202114.3 KiB452381

statement.goH A D02-Sep-20212.6 KiB8443

statement_test.goH A D02-Sep-20216.9 KiB196158

stats.goH A D02-Sep-20215.4 KiB170106

timestampbound.goH A D02-Sep-20218.8 KiB243107

timestampbound_test.goH A D02-Sep-20215.9 KiB207169

transaction.goH A D02-Sep-202143.4 KiB1,335861

transaction_test.goH A D02-Sep-202120.7 KiB680551

value.goH A D02-Sep-202188.3 KiB3,4252,959

value_benchmarks_test.goH A D02-Sep-20215.7 KiB233197

value_test.goH A D02-Sep-2021101.5 KiB2,7432,481

README.md

1## Cloud Spanner [![Go Reference](https://pkg.go.dev/badge/cloud.google.com/go/spanner.svg)](https://pkg.go.dev/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://pkg.go.dev/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```