...

Package ql

import "github.com/golang-migrate/migrate/v4/database/ql"
Overview
Index

Overview ▾

Variables

var (
    ErrDatabaseDirty  = fmt.Errorf("database is dirty")
    ErrNilConfig      = fmt.Errorf("no config")
    ErrNoDatabaseName = fmt.Errorf("no database name")
    ErrAppendPEM      = fmt.Errorf("failed to append PEM")
)
var DefaultMigrationsTable = "schema_migrations"

func WithInstance

func WithInstance(instance *sql.DB, config *Config) (database.Driver, error)

type Config

type Config struct {
    MigrationsTable string
    DatabaseName    string
}

type Ql

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

func (*Ql) Close

func (m *Ql) Close() error

func (*Ql) Drop

func (m *Ql) Drop() (err error)

func (*Ql) Lock

func (m *Ql) Lock() error

func (*Ql) Open

func (m *Ql) Open(url string) (database.Driver, error)

func (*Ql) Run

func (m *Ql) Run(migration io.Reader) error

func (*Ql) SetVersion

func (m *Ql) SetVersion(version int, dirty bool) error

func (*Ql) Unlock

func (m *Ql) Unlock() error

func (*Ql) Version

func (m *Ql) Version() (version int, dirty bool, err error)