2018-04-30 18:42:17 +05:00
|
|
|
package database
|
|
|
|
|
|
|
|
import (
|
|
|
|
// other
|
|
|
|
"github.com/jmoiron/sqlx"
|
|
|
|
)
|
|
|
|
|
2018-04-30 22:31:48 +05:00
|
|
|
// Handler is an interfaceable structure that proxifies calls from anyone
|
|
|
|
// to Database structure.
|
2018-04-30 18:42:17 +05:00
|
|
|
type Handler struct{}
|
|
|
|
|
2018-04-30 22:31:48 +05:00
|
|
|
// GetDatabaseConnection returns current database connection.
|
2018-04-30 18:42:17 +05:00
|
|
|
func (dbh Handler) GetDatabaseConnection() *sqlx.DB {
|
|
|
|
return d.GetDatabaseConnection()
|
|
|
|
}
|
|
|
|
|
2018-04-30 22:31:48 +05:00
|
|
|
// Initialize initializes connection to database.
|
2018-04-30 18:42:17 +05:00
|
|
|
func (dbh Handler) Initialize() {
|
|
|
|
d.Initialize()
|
|
|
|
}
|