migrations

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

SpannerMigrations implements a migration manager for the Spanner datastore.

Functions

This section is empty.

Types

type SpannerMigrationDriver

type SpannerMigrationDriver struct {
	// contains filtered or unexported fields
}

SpannerMigrationDriver can migrate a Cloud Spanner instance The adminClient is required for DDL changes

func NewSpannerDriver

func NewSpannerDriver(database, credentialsFilePath, emulatorHost string) (*SpannerMigrationDriver, error)

NewSpannerDriver returns a migration driver for the given Cloud Spanner instance

func (*SpannerMigrationDriver) Close

func (*SpannerMigrationDriver) Conn added in v1.9.0

func (smd *SpannerMigrationDriver) Conn() Wrapper

Conn returns the underlying spanner clients in a Wrapper instance for MigrationFunc to use

func (*SpannerMigrationDriver) RunTx added in v1.9.0

func (*SpannerMigrationDriver) Version

func (smd *SpannerMigrationDriver) Version(ctx context.Context) (string, error)

func (*SpannerMigrationDriver) WriteVersion

func (smd *SpannerMigrationDriver) WriteVersion(_ context.Context, rwt *spanner.ReadWriteTransaction, version, replaced string) error

type Wrapper added in v1.9.0

type Wrapper struct {
	// contains filtered or unexported fields
}

Wrapper makes it possible to forward the spanner clients to the MigrationFunc's to execute

Jump to

Keyboard shortcuts

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