func (d *QueryLogger) Query(query string, args ...interface{}) (*sql.Rows, error) {
	if d.Logger != nil {
		q, err := querytools.InterpolateParams(query, args...)
		if err != nil {
			return nil, errors.Err(err)
		}
		d.Logger.Debugln(q)
		defer logQueryTime(d.Logger, time.Now())
	}
	return d.DB.Query(query, args...)
}
Query implements the Executor Query function
package db
import (
	"database/sql"
	"time"
	"github.com/lbryio/lbry.go/extras/errors"
	querytools "github.com/lbryio/lbry.go/extras/query"
	"github.com/jmoiron/sqlx"
	_ "github.com/jteeuwen/go-bindata"  
	log "github.com/sirupsen/logrus"
	"github.com/volatiletech/sqlboiler/boil"
)
func logQueryTime(logger *log.Logger, startTime time.Time) {
	logger.Debugln("Query took " + time.Since(startTime).String())
}
type QueryLogger struct {
	DB      *sqlx.DB
	Logger  *log.Logger
	Enabled bool
}