mysql

package module
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(dsn string) (m.Driver, error)

New creates a new Driver driver. The DSN is documented here: https://github.com/go-sql-driver/mysql#dsn-data-source-name

func NewFromDB

func NewFromDB(db *sql.DB) (m.Driver, error)

NewFromDB returns a mysql driver from a sql.DB

Types

type Driver

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

Driver is the mysql migration.Driver implementation

func (*Driver) Close

func (driver *Driver) Close() error

Close closes the connection to the Driver server.

func (*Driver) Migrate

func (driver *Driver) Migrate(migration *m.PlannedMigration) error

Migrate runs a migration.

func (*Driver) Versions

func (driver *Driver) Versions() ([]string, error)

Versions lists all the applied versions.

Jump to

Keyboard shortcuts

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