func (wnfq *WithNilFieldsQuery) ExistX(ctx context.Context) bool {
	exist, err := wnfq.Exist(ctx)
	if err != nil {
		panic(err)
	}
	return exist
}
ExistX is like Exist, but panics if an error occurs.
package ent
import (
	"context"
	"errors"
	"fmt"
	"math"
	"entgo.io/contrib/schemast/internal/mutatetest/ent/predicate"
	"entgo.io/contrib/schemast/internal/mutatetest/ent/withnilfields"
	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"entgo.io/ent/schema/field"
)
type WithNilFieldsQuery struct {
	config
	limit      *int
	offset     *int
	unique     *bool
	order      []OrderFunc
	fields     []string
	predicates []predicate.WithNilFields
	sql  *sql.Selector
	path func(context.Context) (*sql.Selector, error)
}
func (wnfq *WithNilFieldsQuery) Where(ps ...predicate.WithNilFields) *WithNilFieldsQuery {
	wnfq.predicates = append(wnfq.predicates, ps...)
	return wnfq
}
func (wnfq *WithNilFieldsQuery) Limit(limit int) *WithNilFieldsQuery {
	wnfq.limit = &limit
	return wnfq
}
func (wnfq *WithNilFieldsQuery) Offset(offset int) *WithNilFieldsQuery {
	wnfq.offset = &offset
	return wnfq
}
func (wnfq *WithNilFieldsQuery) Unique(unique bool) *WithNilFieldsQuery {
	wnfq.unique = &unique
	return wnfq
}
func (wnfq *WithNilFieldsQuery) Order(o ...OrderFunc) *WithNilFieldsQuery {
	wnfq.order = append(wnfq.order, o...)
	return wnfq
}
func (wnfq *WithNilFieldsQuery) First(ctx context.Context) (*WithNilFields, error) {
	nodes, err := wnfq.Limit(1).All(ctx)
	if err != nil {
		return nil, err
	}
	if len(nodes) == 0 {
		return nil, &NotFoundError{withnilfields.Label}
	}
	return nodes[0], nil
}
func (wnfq *WithNilFieldsQuery) FirstX(ctx context.Context) *WithNilFields {
	node, err := wnfq.First(ctx)
	if err != nil && !IsNotFound(err) {
		panic(err)
	}
	return node
}
func (wnfq *WithNilFieldsQuery) FirstID(ctx context.Context) (id int, err error) {
	var ids []int
	if ids, err = wnfq.Limit(1).IDs(ctx); err != nil {
		return
	}
	if len(ids) == 0 {
		err = &NotFoundError{withnilfields.Label}
		return
	}
	return ids[0], nil
}
func (wnfq *WithNilFieldsQuery) FirstIDX(ctx context.Context) int {
	id, err := wnfq.FirstID(ctx)
	if err != nil && !IsNotFound(err) {
		panic(err)
	}
	return id
}
func (wnfq *WithNilFieldsQuery) Only(ctx context.Context) (*WithNilFields, error) {
	nodes, err := wnfq.Limit(2).All(ctx)
	if err != nil {
		return nil, err
	}
	switch len(nodes) {
	case 1:
		return nodes[0], nil
	case 0:
		return nil, &NotFoundError{withnilfields.Label}
	default:
		return nil, &NotSingularError{withnilfields.Label}
	}
}
func (wnfq *WithNilFieldsQuery) OnlyX(ctx context.Context) *WithNilFields {
	node, err := wnfq.Only(ctx)
	if err != nil {
		panic(err)
	}
	return node
}
func (wnfq *WithNilFieldsQuery) OnlyID(ctx context.Context) (id int, err error) {
	var ids []int
	if ids, err = wnfq.Limit(2).IDs(ctx); err != nil {
		return
	}
	switch len(ids) {
	case 1:
		id = ids[0]
	case 0:
		err = &NotFoundError{withnilfields.Label}
	default:
		err = &NotSingularError{withnilfields.Label}
	}
	return
}
func (wnfq *WithNilFieldsQuery) OnlyIDX(ctx context.Context) int {
	id, err := wnfq.OnlyID(ctx)
	if err != nil {
		panic(err)
	}
	return id
}
func (wnfq *WithNilFieldsQuery) All(ctx context.Context) ([]*WithNilFields, error) {
	if err := wnfq.prepareQuery(ctx); err != nil {
		return nil, err
	}
	return wnfq.sqlAll(ctx)
}
func (wnfq *WithNilFieldsQuery) AllX(ctx context.Context) []*WithNilFields {
	nodes, err := wnfq.All(ctx)
	if err != nil {
		panic(err)
	}
	return nodes
}
func (wnfq *WithNilFieldsQuery) IDs(ctx context.Context) ([]int, error) {
	var ids []int
	if err := wnfq.Select(withnilfields.FieldID).Scan(ctx, &ids); err != nil {
		return nil, err
	}
	return ids, nil
}
func (wnfq *WithNilFieldsQuery) IDsX(ctx context.Context) []int {
	ids, err := wnfq.IDs(ctx)
	if err != nil {
		panic(err)
	}
	return ids
}
func (wnfq *WithNilFieldsQuery) Count(ctx context.Context) (int, error) {
	if err := wnfq.prepareQuery(ctx); err != nil {
		return 0, err
	}
	return wnfq.sqlCount(ctx)
}
func (wnfq *WithNilFieldsQuery) CountX(ctx context.Context) int {
	count, err := wnfq.Count(ctx)
	if err != nil {
		panic(err)
	}
	return count
}
func (wnfq *WithNilFieldsQuery) Exist(ctx context.Context) (bool, error) {
	if err := wnfq.prepareQuery(ctx); err != nil {
		return false, err
	}
	return wnfq.sqlExist(ctx)
}