spannerz

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get[T any](ctx context.Context, client Queryer, stmt spanner.Statement) ([]T, error)

func GetSQL

func GetSQL[T any](ctx context.Context, client Queryer, sql string) ([]T, error)

func ReadColumn

func ReadColumn[T any](ctx context.Context, client Queryer, stmt spanner.Statement) (T, error)

ReadColumn will execute the stmt and return the first column

func ReadColumnSQL

func ReadColumnSQL[T any](ctx context.Context, client Queryer, sql string) (T, error)

Types

type Queryer

type Queryer interface {
	Query(ctx context.Context, statement spanner.Statement) *spanner.RowIterator
}

Jump to

Keyboard shortcuts

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