migrations

package
v0.0.0-...-dc1fca4 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Con

type Con interface {
	QueryRow(query string, args ...interface{}) *sql.Row
	Query(query string, args ...interface{}) (*sql.Rows, error)
	Prepare(query string) (*sql.Stmt, error)
	Exec(query string, args ...interface{}) (sql.Result, error)
}

type Migration

type Migration struct {
	Idx       int
	Statement string
	Func      func(Con) error
	Logger    logger
}

func (*Migration) Execute

func (m *Migration) Execute(tx *sql.Tx) error

type Migrations

type Migrations struct {
	Logger logger
	// contains filtered or unexported fields
}

func New

func New(migrations ...interface{}) *Migrations

func (Migrations) Execute

func (list Migrations) Execute(db *sql.DB) error

func (Migrations) ExecuteTx

func (list Migrations) ExecuteTx(tx *sql.Tx) error

Jump to

Keyboard shortcuts

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