sqlite3

package
v0.0.0-...-e0046dd Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package sqlite3 contains an implementation of the go-migrate database.Driver interface using a pure go sqlite3 driver this is almost entirely a copy/paste from the upstream sqlite3 driver swapping underlying drivers

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDatabaseDirty ...
	ErrDatabaseDirty = fmt.Errorf("database is dirty")
	// ErrNilConfig ...
	ErrNilConfig = fmt.Errorf("no config")
	// ErrNoDatabaseName ...
	ErrNoDatabaseName = fmt.Errorf("no database name")
)
View Source
var DefaultMigrationsTable = "schema_migrations"

DefaultMigrationsTable ...

Functions

func WithInstance

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

WithInstance ...

Types

type Config

type Config struct {
	MigrationsTable string
	DatabaseName    string
	NoTxWrap        bool
}

Config ...

type Sqlite

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

Sqlite ...

func (*Sqlite) Close

func (m *Sqlite) Close() error

Close ...

func (*Sqlite) Drop

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

Drop ...

func (*Sqlite) Lock

func (m *Sqlite) Lock() error

Lock ...

func (*Sqlite) Open

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

Open ...

func (*Sqlite) Run

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

Run ...

func (*Sqlite) SetVersion

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

SetVersion ...

func (*Sqlite) Unlock

func (m *Sqlite) Unlock() error

Unlock ...

func (*Sqlite) Version

func (m *Sqlite) Version() (int, bool, error)

Version ...

Jump to

Keyboard shortcuts

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