func Multi() Option {
	return func(query *Query) {
		query.Builder.Multi = true
	}
}
Multi allows several values to be selected.
package query
import (
	"github.com/grafana-tools/sdk"
)
type Option func(constant *Query)
type SortOrder int
const (
	None SortOrder = 0
	AlphabeticalAsc SortOrder = 1
	AlphabeticalDesc SortOrder = 2
	NumericalAsc SortOrder = 3
	NumericalDesc SortOrder = 4
	AlphabeticalNoCaseAsc SortOrder = 5
	AlphabeticalNoCaseDesc SortOrder = 6
)
type RefreshInterval int
const (
	Never = 0
	DashboardLoad = 1
	TimeChange = 2
)
type Query struct {
	Builder sdk.TemplateVar
}
func New(name string, options ...Option) *Query {
	query := &Query{Builder: sdk.TemplateVar{
		Name:  name,
		Label: name,
		Type:  "query",
	}}
	for _, opt := range append([]Option{Refresh(DashboardLoad)}, options...) {
		opt(query)
	}
	return query
}
func DataSource(source string) Option {
	return func(query *Query) {
		query.Builder.Datasource = &source
	}
}
func Request(request string) Option {
	return func(query *Query) {
		query.Builder.Query = request
	}
}
func Sort(order SortOrder) Option {
	return func(query *Query) {
		query.Builder.Sort = int(order)
	}
}
func Refresh(refresh RefreshInterval) Option {
	return func(query *Query) {
		value := int64(refresh)
		query.Builder.Refresh = sdk.BoolInt{Flag: true, Value: &value}
	}
}
func Regex(regex string) Option {
	return func(query *Query) {
		query.Builder.Regex = regex
	}
}
func Label(label string) Option {
	return func(query *Query) {
		query.Builder.Label = label
	}
}
func HideLabel() Option {
	return func(query *Query) {
		query.Builder.Hide = 1
	}
}
func Hide() Option {
	return func(query *Query) {
		query.Builder.Hide = 2
	}
}