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: 3 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
}

Conn holds a connection to a MySQL database schema.

func (Conn) AddApplied

func (c Conn) AddApplied(migration string) error

AddApplied record that a migration was applied.

func (Conn) CreateTable

func (c Conn) CreateTable() error

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

func (Conn) Execute

func (c Conn) Execute(statement string) error

Execute run a statement on the schema.

func (Conn) GetApplied

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

GetApplied returns the list of already applied migrations.

func (Conn) HasTable

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

HasTable check if the schema has the migration table needed for Rambler to operate on it.

func (Conn) RemoveApplied

func (c Conn) RemoveApplied(migration string) error

RemoveApplied record that a migration was reversed.

type Driver

type Driver struct{}

Driver is the type that initialize new connections.

func (Driver) New

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

Jump to

Keyboard shortcuts

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