Documentation ¶
Index ¶
- func CreateDB(t *testing.T, dbName string, superUserConfig postgres.Config) (*sql.DB, error)
- func MustConnect(config postgres.Config) *sql.DB
- func MustOpen(config postgres.Config) *sql.DB
- func RandomDBName(dbNamePrefix string) string
- func TearDownDB(t *testing.T, db *sql.DB, superUserConfig postgres.Config) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustConnect ¶
MustConnect mimics sqlx MustConnect, but for sql.DB, using Config Opens connection to a DB, pings, and panics on error
func MustOpen ¶
MustOpen mimics sqlx MustOpen, but for sql.DB, using Config Opens connection to a DB and panics on error
func RandomDBName ¶ added in v0.4.0
Create random database name to avoid collisions in parallel tests
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.