func (d *Devops) getHostWhereWithHostnames(hostnames []string) string {
	var hostnameClauses []string
	if d.UseJSON {
		for _, s := range hostnames {
			hostnameClauses = append(hostnameClauses, fmt.Sprintf("tagset @> '{\"hostname\": \"%s\"}'", s))
		}
		return fmt.Sprintf("tags_id IN (SELECT id FROM tags WHERE %s)", strings.Join(hostnameClauses, " OR "))
	} else if d.UseTags {
		for _, s := range hostnames {
			hostnameClauses = append(hostnameClauses, fmt.Sprintf("'%s'", s))
		}
		return fmt.Sprintf("tags_id IN (SELECT id FROM tags WHERE hostname IN (%s))", strings.Join(hostnameClauses, ","))
	} else {
		for _, s := range hostnames {
			hostnameClauses = append(hostnameClauses, fmt.Sprintf("'%s'", s))
		}
		return fmt.Sprintf("hostname IN (%s)", strings.Join(hostnameClauses, ","))
	}
}
getHostWhereWithHostnames creates WHERE SQL statement for multiple hostnames.
NOTE 'WHERE' itself is not included, just hostname filter clauses, ready to concatenate to 'WHERE' string
package timescaledb
import (
	"fmt"
	"strings"
	"time"
	"github.com/timescale/tsbs/cmd/tsbs_generate_queries/uses/devops"
	"github.com/timescale/tsbs/pkg/query"
)
func panicIfErr(err error) {
	if err != nil {
		panic(err.Error())
	}
}
const (
	oneMinute = 60
	oneHour   = oneMinute * 60
	timeBucketFmt    = "time_bucket('%d seconds', time)"
	nonTimeBucketFmt = "to_timestamp(((extract(epoch from time)::int)/%d)*%d)"
)
type Devops struct {
	*BaseGenerator
	*devops.Core
}