database

package
v0.0.0-...-a89b161 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2016 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTestDatabase

func CreateTestDatabase(dbPath string, migrationFunctions []func(*gorm.DB) error, fixtureFiles []string) (*gorm.DB, error)

CreateTestDatabase recreates the test database and runs migrations and fixtures as passed in, returning a pointer to the database

func NewDatabase

func NewDatabase(cnf *config.Config) (*gorm.DB, error)

NewDatabase returns a gorm.DB struct, gorm.DB.DB() returns a database handle see http://golang.org/pkg/database/sql/#DB

Types

This section is empty.

Jump to

Keyboard shortcuts

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