func (au *AddressUpdate) Exec(ctx context.Context) error {
	_, err := au.Save(ctx)
	return err
}
Exec executes the query.
package ent
import (
	"context"
	"fmt"
	"time"
	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"entgo.io/ent/schema/field"
	"github.com/go-kratos/beer-shop/app/user/service/internal/data/ent/address"
	"github.com/go-kratos/beer-shop/app/user/service/internal/data/ent/predicate"
	"github.com/go-kratos/beer-shop/app/user/service/internal/data/ent/user"
)
type AddressUpdate struct {
	config
	hooks    []Hook
	mutation *AddressMutation
}
func (au *AddressUpdate) Where(ps ...predicate.Address) *AddressUpdate {
	au.mutation.predicates = append(au.mutation.predicates, ps...)
	return au
}
func (au *AddressUpdate) SetName(s string) *AddressUpdate {
	au.mutation.SetName(s)
	return au
}
func (au *AddressUpdate) SetMobile(s string) *AddressUpdate {
	au.mutation.SetMobile(s)
	return au
}
func (au *AddressUpdate) SetAddress(s string) *AddressUpdate {
	au.mutation.SetAddress(s)
	return au
}
func (au *AddressUpdate) SetPostCode(s string) *AddressUpdate {
	au.mutation.SetPostCode(s)
	return au
}
func (au *AddressUpdate) SetCreatedAt(t time.Time) *AddressUpdate {
	au.mutation.SetCreatedAt(t)
	return au
}
func (au *AddressUpdate) SetNillableCreatedAt(t *time.Time) *AddressUpdate {
	if t != nil {
		au.SetCreatedAt(*t)
	}
	return au
}
func (au *AddressUpdate) SetUpdatedAt(t time.Time) *AddressUpdate {
	au.mutation.SetUpdatedAt(t)
	return au
}
func (au *AddressUpdate) SetNillableUpdatedAt(t *time.Time) *AddressUpdate {
	if t != nil {
		au.SetUpdatedAt(*t)
	}
	return au
}
func (au *AddressUpdate) SetUserID(id int64) *AddressUpdate {
	au.mutation.SetUserID(id)
	return au
}
func (au *AddressUpdate) SetNillableUserID(id *int64) *AddressUpdate {
	if id != nil {
		au = au.SetUserID(*id)
	}
	return au
}
func (au *AddressUpdate) SetUser(u *User) *AddressUpdate {
	return au.SetUserID(u.ID)
}
func (au *AddressUpdate) Mutation() *AddressMutation {
	return au.mutation
}
func (au *AddressUpdate) ClearUser() *AddressUpdate {
	au.mutation.ClearUser()
	return au
}
func (au *AddressUpdate) Save(ctx context.Context) (int, error) {
	var (
		err      error
		affected int
	)
	if len(au.hooks) == 0 {
		affected, err = au.sqlSave(ctx)
	} else {
		var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) {
			mutation, ok := m.(*AddressMutation)
			if !ok {
				return nil, fmt.Errorf("unexpected mutation type %T", m)
			}
			au.mutation = mutation
			affected, err = au.sqlSave(ctx)
			mutation.done = true
			return affected, err
		})
		for i := len(au.hooks) - 1; i >= 0; i-- {
			mut = au.hooks[i](mut)
		}
		if _, err := mut.Mutate(ctx, au.mutation); err != nil {
			return 0, err
		}
	}
	return affected, err
}
func (au *AddressUpdate) SaveX(ctx context.Context) int {
	affected, err := au.Save(ctx)
	if err != nil {
		panic(err)
	}
	return affected
}