dbutil

package
v0.0.0-...-f05d2e9 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2015 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DriverName = "postgres"

DriverName is the name of the database driver used by NewTestDB

Variables

View Source
var DefaultDataSource = testdb.Env("TEST_PG", "sslmode=disable")

DefaultDataSource is the default database DSN prefix used by NewTestDB

Functions

func MapperFunc

func MapperFunc() func(string) string

MapperFunc is a custom name mapping function for sqlx.DB.MapperFunc that translates camelcase to snake case and handles known acronyms.

func NewTestDB

func NewTestDB() (*testdb.TestDB, *sqlx.DB, error)

NewTestDB connects to the default DBMS, creates a new database using testdb, and loads the application's schema.

Types

This section is empty.

Jump to

Keyboard shortcuts

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