func (vsdo *VerySecretDeleteOne) Exec(ctx context.Context) error {
	n, err := vsdo.vsd.Exec(ctx)
	switch {
	case err != nil:
		return err
	case n == 0:
		return &NotFoundError{verysecret.Label}
	default:
		return nil
	}
}
Exec executes the deletion query.
package ent
import (
	"context"
	"fmt"
	"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 VerySecretDelete struct {
	config
	hooks    []Hook
	mutation *VerySecretMutation
}
func (vsd *VerySecretDelete) Where(ps ...predicate.VerySecret) *VerySecretDelete {
	vsd.mutation.Where(ps...)
	return vsd
}
func (vsd *VerySecretDelete) Exec(ctx context.Context) (int, error) {
	var (
		err      error
		affected int
	)
	if len(vsd.hooks) == 0 {
		affected, err = vsd.sqlExec(ctx)
	} else {
		var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {
			mutation, ok := m.(*VerySecretMutation)
			if !ok {
				return nil, fmt.Errorf("unexpected mutation type %T", m)
			}
			vsd.mutation = mutation
			affected, err = vsd.sqlExec(ctx)
			mutation.done = true
			return affected, err
		})
		for i := len(vsd.hooks) - 1; i >= 0; i-- {
			if vsd.hooks[i] == nil {
				return 0, fmt.Errorf("ent: uninitialized hook (forgotten import ent/runtime?)")
			}
			mut = vsd.hooks[i](mut)
		}
		if _, err := mut.Mutate(ctx, vsd.mutation); err != nil {
			return 0, err
		}
	}
	return affected, err
}
func (vsd *VerySecretDelete) ExecX(ctx context.Context) int {
	n, err := vsd.Exec(ctx)
	if err != nil {
		panic(err)
	}
	return n
}
func (vsd *VerySecretDelete) sqlExec(ctx context.Context) (int, error) {
	_spec := &sqlgraph.DeleteSpec{
		Node: &sqlgraph.NodeSpec{
			Table: verysecret.Table,
			ID: &sqlgraph.FieldSpec{
				Type:   field.TypeInt,
				Column: verysecret.FieldID,
			},
		},
	}
	if ps := vsd.mutation.predicates; len(ps) > 0 {
		_spec.Predicate = func(selector *sql.Selector) {
			for i := range ps {
				ps[i](selector)
			}
		}
	}
	return sqlgraph.DeleteNodes(ctx, vsd.driver, _spec)
}
type VerySecretDeleteOne struct {
	vsd *VerySecretDelete
}