aboutsummaryrefslogtreecommitdiff
path: root/internal/postgres/postgres.go
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2019-11-21 19:41:40 -0500
committerJulie Qiu <julie@golang.org>2020-03-27 16:46:48 -0400
commitbb2fa47a767d0ec317bad674353e89a79c6189d0 (patch)
tree8d47339442d06a9f172fd38b741418a9a9000669 /internal/postgres/postgres.go
parent723f3612d1f5a8957fc5210e20f47dbd372e1bb6 (diff)
downloadgo-x-pkgsite-bb2fa47a767d0ec317bad674353e89a79c6189d0.tar.xz
internal/etl: use database.DB instead of sql.DB
Replace the direct use of sql.DB with the new database.DB. This will give us logging of autocomplete queries. Change-Id: I656e07b42359915a69dfc567c4c6f56d41900aab Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/604404 Reviewed-by: Julie Qiu <julieqiu@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'internal/postgres/postgres.go')
-rw-r--r--internal/postgres/postgres.go9
1 files changed, 0 insertions, 9 deletions
diff --git a/internal/postgres/postgres.go b/internal/postgres/postgres.go
index 49e4031b..351c811b 100644
--- a/internal/postgres/postgres.go
+++ b/internal/postgres/postgres.go
@@ -5,8 +5,6 @@
package postgres
import (
- "database/sql"
-
"golang.org/x/discovery/internal/database"
)
@@ -28,10 +26,3 @@ func (db *DB) Close() error {
func (db *DB) Underlying() *database.DB {
return db.db
}
-
-// TODO(jba): remove.
-// GetSQLDB returns the underlying SQL database for the postgres instance. This
-// allows the ETL to perform streaming operations on the database.
-func (db *DB) GetSQLDB() *sql.DB {
- return db.db.Underlying()
-}