blob: 7d8ef8ef6cbd60575761d0251e0364f46120e828 [file] [log] [blame]
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package postgres
import (
"golang.org/x/pkgsite/internal/database"
)
type DB struct {
db *database.DB
}
// New returns a new postgres DB.
func New(db *database.DB) *DB {
return &DB{db}
}
// Close closes a DB.
func (db *DB) Close() error {
return db.db.Close()
}
// Underlying returns the *database.DB inside db.
func (db *DB) Underlying() *database.DB {
return db.db
}