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

..03-May-2022-

admin/H02-Apr-2021-5,9604,241

apiv1/H02-Apr-2021-2,6301,916

internal/H02-Apr-2021-2,7222,191

spannertest/H02-Apr-2021-6,2204,977

spansql/H02-Apr-2021-5,5294,301

CHANGES.mdH A D02-Apr-202122.2 KiB370300

README.mdH A D02-Apr-2021934 3529

batch.goH A D02-Apr-202111.6 KiB380269

batch_test.goH A D02-Apr-20214.1 KiB171135

big_pdml_test.goH A D02-Apr-20211.7 KiB6134

client.goH A D02-Apr-202118.4 KiB551353

client_benchmarks_test.goH A D02-Apr-202112.2 KiB419344

client_test.goH A D02-Apr-202183.2 KiB2,5962,297

cmp_test.goH A D02-Apr-20211.8 KiB6139

doc.goH A D02-Apr-202112 KiB3632

emulator_test.shH A D02-Apr-20211.5 KiB4719

errors.goH A D02-Apr-20216.3 KiB204123

errors112.goH A D02-Apr-20211.2 KiB348

errors113.goH A D02-Apr-20211.2 KiB348

errors_test.goH A D02-Apr-20214.3 KiB10479

examples_test.goH A D02-Apr-202119.7 KiB770603

go.modH A D02-Apr-2021439 1714

go.sumH A D02-Apr-202145.7 KiB466465

go_mod_tidy_hack.goH A D02-Apr-2021918 232

integration_test.goH A D02-Apr-2021108.8 KiB3,5683,056

key.goH A D02-Apr-202112.7 KiB436216

key_test.goH A D02-Apr-202112.4 KiB489456

mutation.goH A D02-Apr-202114 KiB435219

mutation_test.goH A D02-Apr-202117.2 KiB621564

oc_test.goH A D02-Apr-20217.7 KiB288234

pdml.goH A D02-Apr-20214.6 KiB12679

pdml_test.goH A D02-Apr-20215 KiB169134

protoutils.goH A D02-Apr-20213.2 KiB12379

read.goH A D02-Apr-202125.7 KiB798507

read_test.goH A D02-Apr-202150.1 KiB1,7891,554

retry.goH A D02-Apr-20214.6 KiB155102

retry_test.goH A D02-Apr-20212.9 KiB9168

row.goH A D02-Apr-202110.3 KiB309162

row_test.goH A D02-Apr-202148.3 KiB1,7671,583

session.goH A D02-Apr-202154.5 KiB1,7181,142

session_test.goH A D02-Apr-202161 KiB1,9791,518

sessionclient.goH A D02-Apr-202111.1 KiB308205

sessionclient_test.goH A D02-Apr-202114.3 KiB452381

statement.goH A D02-Apr-20212.9 KiB9452

statement_test.goH A D02-Apr-20217.2 KiB207168

stats.goH A D02-Apr-20215.4 KiB170106

timestampbound.goH A D02-Apr-20218.8 KiB243107

timestampbound_test.goH A D02-Apr-20215.9 KiB207169

transaction.goH A D02-Apr-202142.6 KiB1,320853

transaction_test.goH A D02-Apr-202120.7 KiB680551

value.goH A D02-Apr-202180.8 KiB3,1342,709

value_benchmarks_test.goH A D02-Apr-20215.7 KiB233197

value_test.goH A D02-Apr-202192.5 KiB2,5862,344

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```
35