func (vmu *ValidMessageUpdate) ExecX(ctx context.Context) {
	if err := vmu.Exec(ctx); err != nil {
		panic(err)
	}
}
ExecX is like Exec, but panics if an error occurs.
package ent
import (
	"context"
	"fmt"
	"time"
	"entgo.io/contrib/entproto/internal/entprototest/ent/predicate"
	"entgo.io/contrib/entproto/internal/entprototest/ent/validmessage"
	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"entgo.io/ent/schema/field"
	"github.com/google/uuid"
)
type ValidMessageUpdate struct {
	config
	hooks    []Hook
	mutation *ValidMessageMutation
}
func (vmu *ValidMessageUpdate) Where(ps ...predicate.ValidMessage) *ValidMessageUpdate {
	vmu.mutation.Where(ps...)
	return vmu
}
func (vmu *ValidMessageUpdate) SetName(s string) *ValidMessageUpdate {
	vmu.mutation.SetName(s)
	return vmu
}
func (vmu *ValidMessageUpdate) SetTs(t time.Time) *ValidMessageUpdate {
	vmu.mutation.SetTs(t)
	return vmu
}
func (vmu *ValidMessageUpdate) SetUUID(u uuid.UUID) *ValidMessageUpdate {
	vmu.mutation.SetUUID(u)
	return vmu
}
func (vmu *ValidMessageUpdate) SetU8(u uint8) *ValidMessageUpdate {
	vmu.mutation.ResetU8()
	vmu.mutation.SetU8(u)
	return vmu
}
func (vmu *ValidMessageUpdate) AddU8(u uint8) *ValidMessageUpdate {
	vmu.mutation.AddU8(u)
	return vmu
}
func (vmu *ValidMessageUpdate) SetOpti8(i int8) *ValidMessageUpdate {
	vmu.mutation.ResetOpti8()
	vmu.mutation.SetOpti8(i)
	return vmu
}
func (vmu *ValidMessageUpdate) SetNillableOpti8(i *int8) *ValidMessageUpdate {
	if i != nil {
		vmu.SetOpti8(*i)
	}
	return vmu
}
func (vmu *ValidMessageUpdate) AddOpti8(i int8) *ValidMessageUpdate {
	vmu.mutation.AddOpti8(i)
	return vmu
}
func (vmu *ValidMessageUpdate) ClearOpti8() *ValidMessageUpdate {
	vmu.mutation.ClearOpti8()
	return vmu
}
func (vmu *ValidMessageUpdate) Mutation() *ValidMessageMutation {
	return vmu.mutation
}
func (vmu *ValidMessageUpdate) Save(ctx context.Context) (int, error) {
	var (
		err      error
		affected int
	)
	if len(vmu.hooks) == 0 {
		affected, err = vmu.sqlSave(ctx)
	} else {
		var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {
			mutation, ok := m.(*ValidMessageMutation)
			if !ok {
				return nil, fmt.Errorf("unexpected mutation type %T", m)
			}
			vmu.mutation = mutation
			affected, err = vmu.sqlSave(ctx)
			mutation.done = true
			return affected, err
		})
		for i := len(vmu.hooks) - 1; i >= 0; i-- {
			if vmu.hooks[i] == nil {
				return 0, fmt.Errorf("ent: uninitialized hook (forgotten import ent/runtime?)")
			}
			mut = vmu.hooks[i](mut)
		}
		if _, err := mut.Mutate(ctx, vmu.mutation); err != nil {
			return 0, err
		}
	}
	return affected, err
}
func (vmu *ValidMessageUpdate) SaveX(ctx context.Context) int {
	affected, err := vmu.Save(ctx)
	if err != nil {
		panic(err)
	}
	return affected
}
func (vmu *ValidMessageUpdate) Exec(ctx context.Context) error {
	_, err := vmu.Save(ctx)
	return err
}