driver

package
v4.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2018 License: Unlicense Imports: 1 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, driver Driver) error

Register register a driver

Types

type Conn

type Conn interface {
	HasTable() (bool, error)
	CreateTable() error
	GetApplied() ([]string, error)
	AddApplied(string) error
	RemoveApplied(string) error
	Execute(string) error
}

Conn is the interface used by the program to manipulate the migration table.

func Get

func Get(drv, dsn, schema, table string) (Conn, error)

Get initialize a driver from the given environment

type Driver

type Driver interface {
	New(dns, schema, table string) (Conn, error)
}

Driver is the interface used by the program to initialize the database connection.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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