func apiQuery(query string, args ...interface{}) (*sql.Rows, error) {
	if chainquery == nil {
		return nil, errors.Base("no connection to chainquery database.")
	}
	return chainquery.Query(query, args...)
}
Used to query the chainquery database...
package db
import (
	"database/sql"
	"strconv"
	"github.com/lbryio/lbry.go/extras/errors"
	"github.com/volatiletech/sqlboiler/boil"
)
var chainquery boil.Executor
func InitAPIQuery(dsn string, debug bool) (*QueryLogger, error) {
	if dsn == "" {
		return nil, errors.Base("chainquery DSN was not provided.")
	}
	_, logWrapper, err := dbInitConnection(dsn, "mysql", debug)
	if err != nil {
		return nil, err
	}
	chainquery = logWrapper
	return logWrapper, nil
}