database

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DialectExecutor

type DialectExecutor interface {
	// Setup is called on the dialect on initialization, returns the DSN (modified if necessary) to use for migrations
	Setup(context.Context) (string, error)

	// Validate is called before startup to check that the dialect can execute properly. If returns true and error is set, the error is merely logged.
	Validate(context.Context) (bool, error)

	// Prepare is called before migrations and upgrades are run
	Prepare(context.Context) error

	// Finalize is called after migrations and upgrades are run, with the resulting error. This function can modify the returning error from the migrator.
	Finalize(context.Context, error) error
}

func GetExecutor

func GetExecutor(logger hclog.Logger, dsn string, c *history.Config) (schema.DialectType, DialectExecutor, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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