db

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: May 24, 2017 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DSN

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

func NewDSN

func NewDSN(dsn string) (cfg *DSN, err error)

parseDSN parses the DSN string to a config

type Db

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

func NewDb

func NewDb(dsn string, schemaDir, testDir string) *Db

func (*Db) CreateDb

func (d *Db) CreateDb() (err error)

func (*Db) DB

func (d *Db) DB() *sql.DB

func (*Db) DropDb

func (d *Db) DropDb() (err error)

func (*Db) Dump

func (d *Db) Dump(query string) (tableData [][]string, err error)

func (*Db) DumpJson

func (d *Db) DumpJson(query string) (string, error)

func (*Db) DumpString added in v1.1.2

func (d *Db) DumpString(query string) ([][]string, error)

func (*Db) LoadData

func (d *Db) LoadData() (err error)

func (*Db) LoadDataInfiles

func (d *Db) LoadDataInfiles(dir string) error

func (*Db) LoadSchema

func (d *Db) LoadSchema(data []byte) (err error)

func (*Db) Start

func (d *Db) Start() (err error)

func (*Db) Stop

func (d *Db) Stop() (err error)

func (*Db) TableExpected added in v1.1.2

func (d *Db) TableExpected(filename string) [][]string

func (*Db) TableGot added in v1.1.2

func (d *Db) TableGot(table, orderBy string) [][]string

func (*Db) TruncateAllTables

func (d *Db) TruncateAllTables(orgDB *sql.DB) error

func (*Db) TruncateDataTables

func (d *Db) TruncateDataTables() error

func (*Db) TruncateTables

func (d *Db) TruncateTables(tables []string) error

Jump to

Keyboard shortcuts

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