MCPcopy
hub / github.com/jackc/pgx / openDB

Function openDB

stdlib/sql_test.go:30–35  ·  view source on GitHub ↗
(t testing.TB, opts ...stdlib.OptionOpenDB)

Source from the content-addressed store, hash-verified

28)
29
30func openDB(t testing.TB, opts ...stdlib.OptionOpenDB) *sql.DB {
31 t.Helper()
32 config, err := pgx.ParseConfig(os.Getenv("PGX_TEST_DATABASE"))
33 require.NoError(t, err)
34 return stdlib.OpenDB(*config, opts...)
35}
36
37func closeDB(t testing.TB, db *sql.DB) {
38 err := db.Close()

Calls 1

OpenDBFunction · 0.92

Tested by

no test coverage detected