func (m *MessageMutation) AddedIDs(name string) []ent.Value {
	return nil
}
AddedIDs returns all IDs (to other nodes) that were added for the given edge
name in this mutation.
package ent
import (
	"context"
	"fmt"
	"sync"
	"entgo.io/contrib/schemast/internal/loadtest/ent/predicate"
	"entgo.io/ent"
)
const (
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne
	TypeMessage = "Message"
)
type MessageMutation struct {
	config
	op            Op
	typ           string
	id            *int
	clearedFields map[string]struct{}
	done          bool
	oldValue      func(context.Context) (*Message, error)
	predicates    []predicate.Message
}
var _ ent.Mutation = (*MessageMutation)(nil)
type messageOption func(*MessageMutation)
func newMessageMutation(c config, op Op, opts ...messageOption) *MessageMutation {
	m := &MessageMutation{
		config:        c,
		op:            op,
		typ:           TypeMessage,
		clearedFields: make(map[string]struct{}),
	}
	for _, opt := range opts {
		opt(m)
	}
	return m
}
func withMessageID(id int) messageOption {
	return func(m *MessageMutation) {
		var (
			err   error
			once  sync.Once
			value *Message
		)
		m.oldValue = func(ctx context.Context) (*Message, error) {
			once.Do(func() {
				if m.done {
					err = fmt.Errorf("querying old values post mutation is not allowed")
				} else {
					value, err = m.Client().Message.Get(ctx, id)
				}
			})
			return value, err
		}
		m.id = &id
	}
}
func withMessage(node *Message) messageOption {
	return func(m *MessageMutation) {
		m.oldValue = func(context.Context) (*Message, error) {
			return node, nil
		}
		m.id = &node.ID
	}
}
func (m MessageMutation) Client() *Client {
	client := &Client{config: m.config}
	client.init()
	return client
}
func (m MessageMutation) Tx() (*Tx, error) {
	if _, ok := m.driver.(*txDriver); !ok {
		return nil, fmt.Errorf("ent: mutation is not running in a transaction")
	}
	tx := &Tx{config: m.config}
	tx.init()
	return tx, nil
}
func (m *MessageMutation) ID() (id int, exists bool) {
	if m.id == nil {
		return
	}
	return *m.id, true
}
func (m *MessageMutation) Where(ps ...predicate.Message) {
	m.predicates = append(m.predicates, ps...)
}
func (m *MessageMutation) Op() Op {
	return m.op
}
func (m *MessageMutation) Type() string {
	return m.typ
}
func (m *MessageMutation) Fields() []string {
	fields := make([]string, 0, 0)
	return fields
}
func (m *MessageMutation) Field(name string) (ent.Value, bool) {
	return nil, false
}
func (m *MessageMutation) OldField(ctx context.Context, name string) (ent.Value, error) {
	return nil, fmt.Errorf("unknown Message field %s", name)
}
func (m *MessageMutation) SetField(name string, value ent.Value) error {
	switch name {
	}
	return fmt.Errorf("unknown Message field %s", name)
}
func (m *MessageMutation) AddedFields() []string {
	return nil
}
func (m *MessageMutation) AddedField(name string) (ent.Value, bool) {
	return nil, false
}
func (m *MessageMutation) AddField(name string, value ent.Value) error {
	return fmt.Errorf("unknown Message numeric field %s", name)
}
func (m *MessageMutation) ClearedFields() []string {
	return nil
}
func (m *MessageMutation) FieldCleared(name string) bool {
	_, ok := m.clearedFields[name]
	return ok
}
func (m *MessageMutation) ClearField(name string) error {
	return fmt.Errorf("unknown Message nullable field %s", name)
}
func (m *MessageMutation) ResetField(name string) error {
	return fmt.Errorf("unknown Message field %s", name)
}
func (m *MessageMutation) AddedEdges() []string {
	edges := make([]string, 0, 0)
	return edges
}