package ql

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

Index

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"

Functions

func WithInstance

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

Types

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)

Source Files

ql.go

Version
v4.18.2 (latest)
Published
Jan 27, 2025
Platform
js/wasm
Imports
10 packages
Last checked
1 week ago

Tools for package owners.