dbump_pg

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Migrator

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

Migrator to migrate Postgres.

func NewMigrator

func NewMigrator(conn *sql.DB) *Migrator

NewMigrator instantiates new Migrator. Takes std *sql.DB.

func (*Migrator) Exec

func (pg *Migrator) Exec(ctx context.Context, query string, args ...interface{}) error

Exec is a method for Migrator interface.

func (*Migrator) Init

func (pg *Migrator) Init(ctx context.Context) error

Init migrator.

func (*Migrator) LockDB

func (pg *Migrator) LockDB(ctx context.Context) error

LockDB is a method for Migrator interface.

func (*Migrator) SetVersion

func (pg *Migrator) SetVersion(ctx context.Context, version int) error

SetVersion is a method for Migrator interface.

func (*Migrator) UnlockDB

func (pg *Migrator) UnlockDB(ctx context.Context) error

UnlockDB is a method for Migrator interface.

func (*Migrator) Version

func (pg *Migrator) Version(ctx context.Context) (version int, err error)

Version is a method for Migrator interface.

Jump to

Keyboard shortcuts

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