examples

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 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 any) 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