func NewQueryBuilder() QueryBuilder {
	return &queryBuilderImpl{}
}
NewQueryBuilder creates a new visibility QueryBuilder
package internal
import (
	"fmt"
	"math"
	"strings"
	"time"
	"go.uber.org/cadence/.gen/go/shared"
)
type (
	WorkflowStatus string
)
const (
	WorkflowStatusOpen WorkflowStatus = "OPEN"
	WorkflowStatusClosed WorkflowStatus = "CLOSED"
	WorkflowStatusALL WorkflowStatus = "ALL"
)
var (
	WorkflowStatusCompleted = WorkflowStatus(shared.WorkflowExecutionCloseStatusCompleted.String())
	WorkflowStatusFailed = WorkflowStatus(shared.WorkflowExecutionCloseStatusFailed.String())
	WorkflowStatusCanceled = WorkflowStatus(shared.WorkflowExecutionCloseStatusCanceled.String())
	WorkflowStatusTerminated = WorkflowStatus(shared.WorkflowExecutionCloseStatusTerminated.String())
	WorkflowStatusContinuedAsNew = WorkflowStatus(shared.WorkflowExecutionCloseStatusContinuedAsNew.String())
	WorkflowStatusTimedOut = WorkflowStatus(shared.WorkflowExecutionCloseStatusTimedOut.String())
)
const (
	keyWorkflowType = "WorkflowType"
	keyCloseStatus  = "CloseStatus"
	keyStartTime    = "StartTime"
	keyCloseTime    = "CloseTime"
)
var (
	maxTimestamp = time.Unix(0, math.MaxInt64)
)
type (
	QueryBuilder interface {
		WorkflowTypes([]string) QueryBuilder
		WorkflowStatus([]WorkflowStatus) QueryBuilder
		StartTime(time.Time, time.Time) QueryBuilder
		Build() string
	}
	queryBuilderImpl struct {
		builder strings.Builder
	}
)