func (u *defaultInfluxQueryService) ExecuteQuery(client influx.Client, database, command string) (res []influx.Result, err error) {
	query := influx.Query{
		Command:  command,
		Database: database,
	}
	if response, err := client.Query(query); err == nil {
		if response.Error() != nil {
			return res, response.Error()
		}
		res = response.Results
	} else {
		return res, err
	}
	return res, err
}
ExecuteQuery sends a command query to an InfluxDB server
package influxqueries
import (
	"fmt"
	"strings"
	influx "github.com/influxdata/influxdb/client/v2"
)
type InfluxShowResult struct {
	Values [][]string
}
type InfluxQueryService interface {
	ExecuteQuery(client influx.Client, database, command string) ([]influx.Result, error)
	ExecuteShowQuery(influxClient influx.Client, database, query string) (*InfluxShowResult, error)
}
type defaultInfluxQueryService struct {
}
func NewInfluxQueryService() InfluxQueryService {
	return &defaultInfluxQueryService{}
}