testutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyDDL

func ApplyDDL(ctx context.Context, adminClient *dbadmin.DatabaseAdminClient, dbname string, statements ...string) error

ApplyDDL applies DDL statements and waits until finished.

func ApplyTestSchema

func ApplyTestSchema(ctx context.Context, adminClient *dbadmin.DatabaseAdminClient, dbname string) error

ApplyTestScheme applies test schema in testdata.

func CheckDatabaseExist

func CheckDatabaseExist(ctx context.Context, dbAdminCli *dbadmin.DatabaseAdminClient, fullDBName string) (bool, error)

func CreateDatabase

func CreateDatabase(ctx context.Context, dbAdminCli *dbadmin.DatabaseAdminClient, projectName, instanceName, dbName string) error

func CreateInstance

func CreateInstance(ctx context.Context, insAdminCli *insadmin.InstanceAdminClient, projectName, instanceName string) error

func DatabaseName

func DatabaseName(projectName, instanceName, dbName string) string

func DeleteAllData

func DeleteAllData(ctx context.Context, client *spanner.Client) error

func DropDatabase

func DropDatabase(ctx context.Context, dbAdminCli *dbadmin.DatabaseAdminClient, fullDBName string) error

func SetupDatabase

func SetupDatabase(ctx context.Context, projectName, instanceName, dbName string) error

func TestClient

func TestClient(ctx context.Context, projectName, instanceName, dbName string) (*spanner.Client, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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