update

package
v0.0.0-...-5cb4d56 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Simulate updates by adding test data to a Spanner database

Index

Constants

View Source
const (
	NOT_FOUND     = -1
	SPANNER_ERROR = -2
)

Variables

This section is empty.

Functions

func AddAllNoTxn

func AddAllNoTxn(ctx context.Context, client *spanner.Client,
	firstName, lastName, albumTitle string) (*int64, error)

Adds a singer and album first checking for the existence of the singer but not in the same transaction. Returns: The id of the singer, either existing or newly created

func AddAllTxn

func AddAllTxn(ctx context.Context, client *spanner.Client,
	firstName, lastName, albumTitle string) (*int64, error)

Adds a singer and album first checking for existence within the transaction Return the album id created or that already existed

func CountRows

func CountRows(client *spanner.Client,
	fieldName, tableName string) (int64, error)

Count the singers with a select query

Types

type AppError

type AppError struct {
	Message string
	Code    int
}

func (AppError) Error

func (e AppError) Error() string

Jump to

Keyboard shortcuts

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