database

package
v0.0.0-...-155fe22 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(db *sqlx.DB) error

Migrate attempts to bring the schema for db up to date with the migrations defined in this package.

func Open

func Open(cfg *config.Config) (*sqlx.DB, error)

Open knows how to open a database connection based on the configuration.

func Seed

func Seed(db *sqlx.DB) error

Seed runs the set of seed-data queries against db. The queries are ran in a transaction and rolled back if any fail.

func StatusCheck

func StatusCheck(db *sqlx.DB) error

StatusCheck returns nil if it can successfully talk to the database. It returns a non-nil error otherwise. This forces a round trip to the database.

Types

This section is empty.

Jump to

Keyboard shortcuts

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