func (b *BatchBuilder) Query(session gocqlx.Session) *gocqlx.Queryx {
	return session.Query(b.ToCql())
}
Query returns query built on top of current BatchBuilder state.
package qb
import (
	"bytes"
	"context"
	"fmt"
	"time"
	"github.com/scylladb/gocqlx/v2"
)
type BatchBuilder struct {
	unlogged bool
	counter  bool
	using    using
	stmts    []string
	names    []string
}
func Batch() *BatchBuilder {
	return &BatchBuilder{}
}
func (b *BatchBuilder) ToCql() (stmt string, names []string) {
	cql := bytes.Buffer{}
	cql.WriteString("BEGIN ")
	if b.unlogged {
		cql.WriteString("UNLOGGED ")
	}
	if b.counter {
		cql.WriteString("COUNTER ")
	}
	cql.WriteString("BATCH ")
	names = append(names, b.using.writeCql(&cql)...)
	for _, stmt := range b.stmts {
		cql.WriteString(stmt)
		cql.WriteByte(';')
		cql.WriteByte(' ')
	}
	names = append(names, b.names...)
	cql.WriteString("APPLY BATCH ")
	stmt = cql.String()
	return
}