func (vsgb *VerySecretGroupBy) Float64sX(ctx context.Context) []float64 {
	v, err := vsgb.Float64s(ctx)
	if err != nil {
		panic(err)
	}
	return v
}
Float64sX is like Float64s, but panics if an error occurs.
package ent
import (
	"context"
	"errors"
	"fmt"
	"math"
	"entgo.io/contrib/entgql/internal/todo/ent/predicate"
	"entgo.io/contrib/entgql/internal/todo/ent/verysecret"
	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"entgo.io/ent/schema/field"
)
type VerySecretQuery struct {
	config
	limit      *int
	offset     *int
	unique     *bool
	order      []OrderFunc
	fields     []string
	predicates []predicate.VerySecret
	sql  *sql.Selector
	path func(context.Context) (*sql.Selector, error)
}
func (vsq *VerySecretQuery) Where(ps ...predicate.VerySecret) *VerySecretQuery {
	vsq.predicates = append(vsq.predicates, ps...)
	return vsq
}
func (vsq *VerySecretQuery) Limit(limit int) *VerySecretQuery {
	vsq.limit = &limit
	return vsq
}
func (vsq *VerySecretQuery) Offset(offset int) *VerySecretQuery {
	vsq.offset = &offset
	return vsq
}
func (vsq *VerySecretQuery) Unique(unique bool) *VerySecretQuery {
	vsq.unique = &unique
	return vsq
}
func (vsq *VerySecretQuery) Order(o ...OrderFunc) *VerySecretQuery {
	vsq.order = append(vsq.order, o...)
	return vsq
}
func (vsq *VerySecretQuery) First(ctx context.Context) (*VerySecret, error) {
	nodes, err := vsq.Limit(1).All(ctx)
	if err != nil {
		return nil, err
	}
	if len(nodes) == 0 {
		return nil, &NotFoundError{verysecret.Label}
	}
	return nodes[0], nil
}
func (vsq *VerySecretQuery) FirstX(ctx context.Context) *VerySecret {
	node, err := vsq.First(ctx)
	if err != nil && !IsNotFound(err) {
		panic(err)
	}
	return node
}
func (vsq *VerySecretQuery) FirstID(ctx context.Context) (id int, err error) {
	var ids []int
	if ids, err = vsq.Limit(1).IDs(ctx); err != nil {
		return
	}
	if len(ids) == 0 {
		err = &NotFoundError{verysecret.Label}
		return
	}
	return ids[0], nil
}
func (vsq *VerySecretQuery) FirstIDX(ctx context.Context) int {
	id, err := vsq.FirstID(ctx)
	if err != nil && !IsNotFound(err) {
		panic(err)
	}
	return id
}
func (vsq *VerySecretQuery) Only(ctx context.Context) (*VerySecret, error) {
	nodes, err := vsq.Limit(2).All(ctx)
	if err != nil {
		return nil, err
	}
	switch len(nodes) {
	case 1:
		return nodes[0], nil
	case 0:
		return nil, &NotFoundError{verysecret.Label}
	default:
		return nil, &NotSingularError{verysecret.Label}
	}
}
func (vsq *VerySecretQuery) OnlyX(ctx context.Context) *VerySecret {
	node, err := vsq.Only(ctx)
	if err != nil {
		panic(err)
	}
	return node
}
func (vsq *VerySecretQuery) OnlyID(ctx context.Context) (id int, err error) {
	var ids []int
	if ids, err = vsq.Limit(2).IDs(ctx); err != nil {
		return
	}
	switch len(ids) {
	case 1:
		id = ids[0]
	case 0:
		err = &NotFoundError{verysecret.Label}
	default:
		err = &NotSingularError{verysecret.Label}
	}
	return
}
func (vsq *VerySecretQuery) OnlyIDX(ctx context.Context) int {
	id, err := vsq.OnlyID(ctx)
	if err != nil {
		panic(err)
	}
	return id
}
func (vsq *VerySecretQuery) All(ctx context.Context) ([]*VerySecret, error) {
	if err := vsq.prepareQuery(ctx); err != nil {
		return nil, err
	}
	return vsq.sqlAll(ctx)
}
func (vsq *VerySecretQuery) AllX(ctx context.Context) []*VerySecret {
	nodes, err := vsq.All(ctx)
	if err != nil {
		panic(err)
	}
	return nodes
}
func (vsq *VerySecretQuery) IDs(ctx context.Context) ([]int, error) {
	var ids []int
	if err := vsq.Select(verysecret.FieldID).Scan(ctx, &ids); err != nil {
		return nil, err
	}
	return ids, nil
}
func (vsq *VerySecretQuery) IDsX(ctx context.Context) []int {
	ids, err := vsq.IDs(ctx)
	if err != nil {
		panic(err)
	}
	return ids
}
func (vsq *VerySecretQuery) Count(ctx context.Context) (int, error) {
	if err := vsq.prepareQuery(ctx); err != nil {
		return 0, err
	}
	return vsq.sqlCount(ctx)
}
func (vsq *VerySecretQuery) CountX(ctx context.Context) int {
	count, err := vsq.Count(ctx)
	if err != nil {
		panic(err)
	}
	return count
}
func (vsq *VerySecretQuery) Exist(ctx context.Context) (bool, error) {
	if err := vsq.prepareQuery(ctx); err != nil {
		return false, err
	}
	return vsq.sqlExist(ctx)
}
func (vsq *VerySecretQuery) ExistX(ctx context.Context) bool {
	exist, err := vsq.Exist(ctx)
	if err != nil {
		panic(err)
	}
	return exist
}
func (vsq *VerySecretQuery) Clone() *VerySecretQuery {
	if vsq == nil {
		return nil
	}
	return &VerySecretQuery{
		config:     vsq.config,
		limit:      vsq.limit,
		offset:     vsq.offset,
		order:      append([]OrderFunc{}, vsq.order...),
		predicates: append([]predicate.VerySecret{}, vsq.predicates...),
		sql:  vsq.sql.Clone(),
		path: vsq.path,
	}
}
func (vsq *VerySecretQuery) GroupBy(field string, fields ...string) *VerySecretGroupBy {
	group := &VerySecretGroupBy{config: vsq.config}
	group.fields = append([]string{field}, fields...)
	group.path = func(ctx context.Context) (prev *sql.Selector, err error) {
		if err := vsq.prepareQuery(ctx); err != nil {
			return nil, err
		}
		return vsq.sqlQuery(ctx), nil
	}
	return group
}
func (vsq *VerySecretQuery) Select(fields ...string) *VerySecretSelect {
	vsq.fields = append(vsq.fields, fields...)
	return &VerySecretSelect{VerySecretQuery: vsq}
}
func (vsq *VerySecretQuery) prepareQuery(ctx context.Context) error {
	for _, f := range vsq.fields {
		if !verysecret.ValidColumn(f) {
			return &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)}
		}
	}
	if vsq.path != nil {
		prev, err := vsq.path(ctx)
		if err != nil {
			return err
		}
		vsq.sql = prev
	}
	return nil
}
func (vsq *VerySecretQuery) sqlAll(ctx context.Context) ([]*VerySecret, error) {
	var (
		nodes = []*VerySecret{}
		_spec = vsq.querySpec()
	)
	_spec.ScanValues = func(columns []string) ([]interface{}, error) {
		node := &VerySecret{config: vsq.config}
		nodes = append(nodes, node)
		return node.scanValues(columns)
	}
	_spec.Assign = func(columns []string, values []interface{}) error {
		if len(nodes) == 0 {
			return fmt.Errorf("ent: Assign called without calling ScanValues")
		}
		node := nodes[len(nodes)-1]
		return node.assignValues(columns, values)
	}
	if err := sqlgraph.QueryNodes(ctx, vsq.driver, _spec); err != nil {
		return nil, err
	}
	if len(nodes) == 0 {
		return nodes, nil
	}
	return nodes, nil
}
func (vsq *VerySecretQuery) sqlCount(ctx context.Context) (int, error) {
	_spec := vsq.querySpec()
	return sqlgraph.CountNodes(ctx, vsq.driver, _spec)
}
func (vsq *VerySecretQuery) sqlExist(ctx context.Context) (bool, error) {
	n, err := vsq.sqlCount(ctx)
	if err != nil {
		return false, fmt.Errorf("ent: check existence: %w", err)
	}
	return n > 0, nil
}
func (vsq *VerySecretQuery) querySpec() *sqlgraph.QuerySpec {
	_spec := &sqlgraph.QuerySpec{
		Node: &sqlgraph.NodeSpec{
			Table:   verysecret.Table,
			Columns: verysecret.Columns,
			ID: &sqlgraph.FieldSpec{
				Type:   field.TypeInt,
				Column: verysecret.FieldID,
			},
		},
		From:   vsq.sql,
		Unique: true,
	}
	if unique := vsq.unique; unique != nil {
		_spec.Unique = *unique
	}
	if fields := vsq.fields; len(fields) > 0 {
		_spec.Node.Columns = make([]string, 0, len(fields))
		_spec.Node.Columns = append(_spec.Node.Columns, verysecret.FieldID)
		for i := range fields {
			if fields[i] != verysecret.FieldID {
				_spec.Node.Columns = append(_spec.Node.Columns, fields[i])
			}
		}
	}
	if ps := vsq.predicates; len(ps) > 0 {
		_spec.Predicate = func(selector *sql.Selector) {
			for i := range ps {
				ps[i](selector)
			}
		}
	}
	if limit := vsq.limit; limit != nil {
		_spec.Limit = *limit
	}
	if offset := vsq.offset; offset != nil {
		_spec.Offset = *offset
	}
	if ps := vsq.order; len(ps) > 0 {
		_spec.Order = func(selector *sql.Selector) {
			for i := range ps {
				ps[i](selector)
			}
		}
	}
	return _spec
}
func (vsq *VerySecretQuery) sqlQuery(ctx context.Context) *sql.Selector {
	builder := sql.Dialect(vsq.driver.Dialect())
	t1 := builder.Table(verysecret.Table)
	columns := vsq.fields
	if len(columns) == 0 {
		columns = verysecret.Columns
	}
	selector := builder.Select(t1.Columns(columns...)...).From(t1)
	if vsq.sql != nil {
		selector = vsq.sql
		selector.Select(selector.Columns(columns...)...)
	}
	for _, p := range vsq.predicates {
		p(selector)
	}
	for _, p := range vsq.order {
		p(selector)
	}
	if offset := vsq.offset; offset != nil {
		selector.Offset(*offset).Limit(math.MaxInt32)
	}
	if limit := vsq.limit; limit != nil {
		selector.Limit(*limit)
	}
	return selector
}
type VerySecretGroupBy struct {
	config
	fields []string
	fns    []AggregateFunc
	sql  *sql.Selector
	path func(context.Context) (*sql.Selector, error)
}
func (vsgb *VerySecretGroupBy) Aggregate(fns ...AggregateFunc) *VerySecretGroupBy {
	vsgb.fns = append(vsgb.fns, fns...)
	return vsgb
}
func (vsgb *VerySecretGroupBy) Scan(ctx context.Context, v interface{}) error {
	query, err := vsgb.path(ctx)
	if err != nil {
		return err
	}
	vsgb.sql = query
	return vsgb.sqlScan(ctx, v)
}
func (vsgb *VerySecretGroupBy) ScanX(ctx context.Context, v interface{}) {
	if err := vsgb.Scan(ctx, v); err != nil {
		panic(err)
	}
}
func (vsgb *VerySecretGroupBy) Strings(ctx context.Context) ([]string, error) {
	if len(vsgb.fields) > 1 {
		return nil, errors.New("ent: VerySecretGroupBy.Strings is not achievable when grouping more than 1 field")
	}
	var v []string
	if err := vsgb.Scan(ctx, &v); err != nil {
		return nil, err
	}
	return v, nil
}
func (vsgb *VerySecretGroupBy) StringsX(ctx context.Context) []string {
	v, err := vsgb.Strings(ctx)
	if err != nil {
		panic(err)
	}
	return v
}
func (vsgb *VerySecretGroupBy) String(ctx context.Context) (_ string, err error) {
	var v []string
	if v, err = vsgb.Strings(ctx); err != nil {
		return
	}
	switch len(v) {
	case 1:
		return v[0], nil
	case 0:
		err = &NotFoundError{verysecret.Label}
	default:
		err = fmt.Errorf("ent: VerySecretGroupBy.Strings returned %d results when one was expected", len(v))
	}
	return
}
func (vsgb *VerySecretGroupBy) StringX(ctx context.Context) string {
	v, err := vsgb.String(ctx)
	if err != nil {
		panic(err)
	}
	return v
}
func (vsgb *VerySecretGroupBy) Ints(ctx context.Context) ([]int, error) {
	if len(vsgb.fields) > 1 {
		return nil, errors.New("ent: VerySecretGroupBy.Ints is not achievable when grouping more than 1 field")
	}
	var v []int
	if err := vsgb.Scan(ctx, &v); err != nil {
		return nil, err
	}
	return v, nil
}
func (vsgb *VerySecretGroupBy) IntsX(ctx context.Context) []int {
	v, err := vsgb.Ints(ctx)
	if err != nil {
		panic(err)
	}
	return v
}
func (vsgb *VerySecretGroupBy) Int(ctx context.Context) (_ int, err error) {
	var v []int
	if v, err = vsgb.Ints(ctx); err != nil {
		return
	}
	switch len(v) {
	case 1:
		return v[0], nil
	case 0:
		err = &NotFoundError{verysecret.Label}
	default:
		err = fmt.Errorf("ent: VerySecretGroupBy.Ints returned %d results when one was expected", len(v))
	}
	return
}
func (vsgb *VerySecretGroupBy) IntX(ctx context.Context) int {
	v, err := vsgb.Int(ctx)
	if err != nil {
		panic(err)
	}
	return v
}
func (vsgb *VerySecretGroupBy) Float64s(ctx context.Context) ([]float64, error) {
	if len(vsgb.fields) > 1 {
		return nil, errors.New("ent: VerySecretGroupBy.Float64s is not achievable when grouping more than 1 field")
	}
	var v []float64
	if err := vsgb.Scan(ctx, &v); err != nil {
		return nil, err
	}
	return v, nil
}