mysql

package
v3.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2016 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

Connection holds a database connection.

func (*Conn) AddApplied

func (c *Conn) AddApplied(migration string) error

AddApplied records a migration as applied.

func (*Conn) CreateTable

func (c *Conn) CreateTable() error

CreateTable create the migration table using a PostgreSQL-compatible syntax.

func (*Conn) Execute

func (c *Conn) Execute(query string) error

Execute run a statement on the schema.

func (*Conn) GetApplied

func (c *Conn) GetApplied() ([]string, error)

GetApplied returns the list of applied migrations.

func (*Conn) HasTable

func (c *Conn) HasTable() (bool, error)

HasTable check if the schema has the migration table.

func (*Conn) RemoveApplied

func (c *Conn) RemoveApplied(migration string) error

RemoveApplied records a migration as reversed.

type Driver

type Driver struct{}

Driver initialize new connections to a PostgreSQL database schema.

func (Driver) New

func (d Driver) New(dsn, schema string) (driver.Conn, error)

New returns a new connection.

Jump to

Keyboard shortcuts

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