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

Function OpenDB

stdlib/sql.go:228–231  ·  view source on GitHub ↗
(config pgx.ConnConfig, opts ...OptionOpenDB)

Source from the content-addressed store, hash-verified

226}
227
228func OpenDB(config pgx.ConnConfig, opts ...OptionOpenDB) *sql.DB {
229 c := GetConnector(config, opts...)
230 return sql.OpenDB(c)
231}
232
233// OpenDBFromPool creates a new *sql.DB from the given *pgxpool.Pool. Note that this method automatically sets the
234// maximum number of idle connections in *sql.DB to zero, since they must be managed from the *pgxpool.Pool. This is

Callers 4

openDBFunction · 0.92

Calls 1

GetConnectorFunction · 0.85

Tested by 4

openDBFunction · 0.74