examples

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DML

Types

type Album

type Album struct {
	SingerID string             `spanner:"SingerId" pk:"1"`
	AlbumID  int64              `spanner:"AlbumId"`
	Title    spanner.NullString `spanner:"Title"`
}

type Singer

type Singer struct {
	// spnr supports 2 types of tags.
	// - spanner: spanner column name
	// - pk: primary key order
	SingerID string `spanner:"SingerId" pk:"1"`
	Name     string `spanner:"Name"`
}

type SingerStore

type SingerStore struct {
	spnr.DML // use spnr.Mutation for mutation API
}

Embedding examples

func NewSingerStore

func NewSingerStore() *SingerStore

func (*SingerStore) GetCount

func (s *SingerStore) GetCount(ctx context.Context, tx spnr.Transaction, cnt interface{}) error

Any methods you want to add

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL