1279eeae39
Replace all the remaining uses of sql.DB with tagsql.DB to fix issues with context cancellation. Introduce tagsql.Open which helps to get rid of all tagsql.Wrap-s. Use tagsql in cockroachkv and postgreskv. Change-Id: I8946d203341cb85a25976896fc7881e1f704e779
34 lines
893 B
Go
34 lines
893 B
Go
// Copyright (C) 2019 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package storagenodedb
|
|
|
|
// dbContainerImpl fulfills the migrate.DB interface and the SQLDB interface.
|
|
type dbContainerImpl struct {
|
|
SQLDB
|
|
}
|
|
|
|
// Schema returns schema
|
|
// These are implemented because the migrate.DB interface requires them.
|
|
// Maybe in the future we should untangle those.
|
|
func (db *dbContainerImpl) Schema() string {
|
|
return ""
|
|
}
|
|
|
|
// Rebind rebind parameters
|
|
// These are implemented because the migrate.DB interface requires them.
|
|
// Maybe in the future we should untangle those.
|
|
func (db *dbContainerImpl) Rebind(s string) string {
|
|
return s
|
|
}
|
|
|
|
// Configure sets the underlining SQLDB connection.
|
|
func (db *dbContainerImpl) Configure(sqlDB SQLDB) {
|
|
db.SQLDB = sqlDB
|
|
}
|
|
|
|
// GetDB returns underlying implementation of dbContainerImpl.
|
|
func (db *dbContainerImpl) GetDB() SQLDB {
|
|
return db.SQLDB
|
|
}
|