func (vsuo *VerySecretUpdateOne) Save(ctx context.Context) (*VerySecret, error) {
	var (
		err  error
		node *VerySecret
	)
	if len(vsuo.hooks) == 0 {
		node, err = vsuo.sqlSave(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)
			}
			vsuo.mutation = mutation
			node, err = vsuo.sqlSave(ctx)
			mutation.done = true
			return node, err
		})
		for i := len(vsuo.hooks) - 1; i >= 0; i-- {
			if vsuo.hooks[i] == nil {
				return nil, fmt.Errorf("ent: uninitialized hook (forgotten import ent/runtime?)")
			}
			mut = vsuo.hooks[i](mut)
		}
		if _, err := mut.Mutate(ctx, vsuo.mutation); err != nil {
			return nil, err
		}
	}
	return node, err
}
Save executes the query and returns the updated VerySecret entity.
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 VerySecretUpdate struct {
	config
	hooks    []Hook
	mutation *VerySecretMutation
}
func (vsu *VerySecretUpdate) Where(ps ...predicate.VerySecret) *VerySecretUpdate {
	vsu.mutation.Where(ps...)
	return vsu
}
func (vsu *VerySecretUpdate) SetPassword(s string) *VerySecretUpdate {
	vsu.mutation.SetPassword(s)
	return vsu
}
func (vsu *VerySecretUpdate) Mutation() *VerySecretMutation {
	return vsu.mutation
}
func (vsu *VerySecretUpdate) Save(ctx context.Context) (int, error) {
	var (
		err      error
		affected int
	)
	if len(vsu.hooks) == 0 {
		affected, err = vsu.sqlSave(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)
			}
			vsu.mutation = mutation
			affected, err = vsu.sqlSave(ctx)
			mutation.done = true
			return affected, err
		})
		for i := len(vsu.hooks) - 1; i >= 0; i-- {
			if vsu.hooks[i] == nil {
				return 0, fmt.Errorf("ent: uninitialized hook (forgotten import ent/runtime?)")
			}
			mut = vsu.hooks[i](mut)
		}
		if _, err := mut.Mutate(ctx, vsu.mutation); err != nil {
			return 0, err
		}
	}
	return affected, err
}
func (vsu *VerySecretUpdate) SaveX(ctx context.Context) int {
	affected, err := vsu.Save(ctx)
	if err != nil {
		panic(err)
	}
	return affected
}
func (vsu *VerySecretUpdate) Exec(ctx context.Context) error {
	_, err := vsu.Save(ctx)
	return err
}
func (vsu *VerySecretUpdate) ExecX(ctx context.Context) {
	if err := vsu.Exec(ctx); err != nil {
		panic(err)
	}
}
func (vsu *VerySecretUpdate) sqlSave(ctx context.Context) (n int, err error) {
	_spec := &sqlgraph.UpdateSpec{
		Node: &sqlgraph.NodeSpec{
			Table:   verysecret.Table,
			Columns: verysecret.Columns,
			ID: &sqlgraph.FieldSpec{
				Type:   field.TypeInt,
				Column: verysecret.FieldID,
			},
		},
	}
	if ps := vsu.mutation.predicates; len(ps) > 0 {
		_spec.Predicate = func(selector *sql.Selector) {
			for i := range ps {
				ps[i](selector)
			}
		}
	}
	if value, ok := vsu.mutation.Password(); ok {
		_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
			Type:   field.TypeString,
			Value:  value,
			Column: verysecret.FieldPassword,
		})
	}
	if n, err = sqlgraph.UpdateNodes(ctx, vsu.driver, _spec); err != nil {
		if _, ok := err.(*sqlgraph.NotFoundError); ok {
			err = &NotFoundError{verysecret.Label}
		} else if sqlgraph.IsConstraintError(err) {
			err = &ConstraintError{err.Error(), err}
		}
		return 0, err
	}
	return n, nil
}
type VerySecretUpdateOne struct {
	config
	fields   []string
	hooks    []Hook
	mutation *VerySecretMutation
}
func (vsuo *VerySecretUpdateOne) SetPassword(s string) *VerySecretUpdateOne {
	vsuo.mutation.SetPassword(s)
	return vsuo
}
func (vsuo *VerySecretUpdateOne) Mutation() *VerySecretMutation {
	return vsuo.mutation
}
func (vsuo *VerySecretUpdateOne) Select(field string, fields ...string) *VerySecretUpdateOne {
	vsuo.fields = append([]string{field}, fields...)
	return vsuo
}