1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: Apache-2.0
8 "git.arvados.org/arvados.git/sdk/go/arvados"
9 "github.com/jmoiron/sqlx"
11 // sqlx needs lib/pq to talk to PostgreSQL
16 // DB returns a DB connection for the given cluster config.
17 func DB(c *check.C, cluster *arvados.Cluster) *sqlx.DB {
18 db, err := sqlx.Open("postgres", cluster.PostgreSQL.Connection.String())
19 c.Assert(err, check.IsNil)