connect

package
v0.0.0-...-6b15219 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	//TestDbName is the name of the test database to create.
	TestDbName = "TEMPORARY_DATABASE_boardgame_test"
)

Variables

This section is empty.

Functions

func Db

func Db(dsn string, testMode bool, createDb bool) (*sql.DB, error)

Db creates the Database handle. If testMode is true, then dbName will be TestDbName.

func DropTestDb

func DropTestDb(dsn string) error

DropTestDb is called to delete the test database. Will fail if the database name isn't TestDbName

func Migrations

func Migrations(db *sql.DB) (*migrate.Migrate, error)

Migrations returns the Migrate object to migrate a database.

Types

This section is empty.

Jump to

Keyboard shortcuts

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