func (dnmuo *DuplicateNumberMessageUpdateOne) SetHello(s string) *DuplicateNumberMessageUpdateOne {
	dnmuo.mutation.SetHello(s)
	return dnmuo
}
SetHello sets the "hello" field.
package ent
import (
	"context"
	"fmt"
	"entgo.io/contrib/entproto/internal/entprototest/ent/duplicatenumbermessage"
	"entgo.io/contrib/entproto/internal/entprototest/ent/predicate"
	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"entgo.io/ent/schema/field"
)
type DuplicateNumberMessageUpdate struct {
	config
	hooks    []Hook
	mutation *DuplicateNumberMessageMutation
}
func (dnmu *DuplicateNumberMessageUpdate) Where(ps ...predicate.DuplicateNumberMessage) *DuplicateNumberMessageUpdate {
	dnmu.mutation.Where(ps...)
	return dnmu
}
func (dnmu *DuplicateNumberMessageUpdate) SetHello(s string) *DuplicateNumberMessageUpdate {
	dnmu.mutation.SetHello(s)
	return dnmu
}
func (dnmu *DuplicateNumberMessageUpdate) SetWorld(s string) *DuplicateNumberMessageUpdate {
	dnmu.mutation.SetWorld(s)
	return dnmu
}
func (dnmu *DuplicateNumberMessageUpdate) Mutation() *DuplicateNumberMessageMutation {
	return dnmu.mutation
}
func (dnmu *DuplicateNumberMessageUpdate) Save(ctx context.Context) (int, error) {
	var (
		err      error
		affected int
	)
	if len(dnmu.hooks) == 0 {
		affected, err = dnmu.sqlSave(ctx)
	} else {
		var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {
			mutation, ok := m.(*DuplicateNumberMessageMutation)
			if !ok {
				return nil, fmt.Errorf("unexpected mutation type %T", m)
			}
			dnmu.mutation = mutation
			affected, err = dnmu.sqlSave(ctx)
			mutation.done = true
			return affected, err
		})
		for i := len(dnmu.hooks) - 1; i >= 0; i-- {
			if dnmu.hooks[i] == nil {
				return 0, fmt.Errorf("ent: uninitialized hook (forgotten import ent/runtime?)")
			}
			mut = dnmu.hooks[i](mut)
		}
		if _, err := mut.Mutate(ctx, dnmu.mutation); err != nil {
			return 0, err
		}
	}
	return affected, err
}
func (dnmu *DuplicateNumberMessageUpdate) SaveX(ctx context.Context) int {
	affected, err := dnmu.Save(ctx)
	if err != nil {
		panic(err)
	}
	return affected
}
func (dnmu *DuplicateNumberMessageUpdate) Exec(ctx context.Context) error {
	_, err := dnmu.Save(ctx)
	return err
}
func (dnmu *DuplicateNumberMessageUpdate) ExecX(ctx context.Context) {
	if err := dnmu.Exec(ctx); err != nil {
		panic(err)
	}
}
func (dnmu *DuplicateNumberMessageUpdate) sqlSave(ctx context.Context) (n int, err error) {
	_spec := &sqlgraph.UpdateSpec{
		Node: &sqlgraph.NodeSpec{
			Table:   duplicatenumbermessage.Table,
			Columns: duplicatenumbermessage.Columns,
			ID: &sqlgraph.FieldSpec{
				Type:   field.TypeInt,
				Column: duplicatenumbermessage.FieldID,
			},
		},
	}
	if ps := dnmu.mutation.predicates; len(ps) > 0 {
		_spec.Predicate = func(selector *sql.Selector) {
			for i := range ps {
				ps[i](selector)
			}
		}
	}
	if value, ok := dnmu.mutation.Hello(); ok {
		_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
			Type:   field.TypeString,
			Value:  value,
			Column: duplicatenumbermessage.FieldHello,
		})
	}
	if value, ok := dnmu.mutation.World(); ok {
		_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
			Type:   field.TypeString,
			Value:  value,
			Column: duplicatenumbermessage.FieldWorld,
		})
	}
	if n, err = sqlgraph.UpdateNodes(ctx, dnmu.driver, _spec); err != nil {
		if _, ok := err.(*sqlgraph.NotFoundError); ok {
			err = &NotFoundError{duplicatenumbermessage.Label}
		} else if sqlgraph.IsConstraintError(err) {
			err = &ConstraintError{err.Error(), err}
		}
		return 0, err
	}
	return n, nil
}
type DuplicateNumberMessageUpdateOne struct {
	config
	fields   []string
	hooks    []Hook
	mutation *DuplicateNumberMessageMutation
}