ql

package
v0.0.0-...-339088f Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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")
)
View Source
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)

Jump to

Keyboard shortcuts

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