func (wf *WithFields) String() string {
	var builder strings.Builder
	builder.WriteString("WithFields(")
	builder.WriteString(fmt.Sprintf("id=%v", wf.ID))
	builder.WriteString(", existing=")
	builder.WriteString(wf.Existing)
	builder.WriteByte(')')
	return builder.String()
}
String implements the fmt.Stringer.
package ent
import (
	"fmt"
	"strings"
	"entgo.io/contrib/schemast/internal/mutatetest/ent/withfields"
	"entgo.io/ent/dialect/sql"
)
type WithFields struct {
	config `json:"-"`
	ID int `json:"id,omitempty"`
	Existing string `json:"existing,omitempty"`
}
func (*WithFields) scanValues(columns []string) ([]interface{}, error) {
	values := make([]interface{}, len(columns))
	for i := range columns {
		switch columns[i] {
		case withfields.FieldID:
			values[i] = new(sql.NullInt64)
		case withfields.FieldExisting:
			values[i] = new(sql.NullString)
		default:
			return nil, fmt.Errorf("unexpected column %q for type WithFields", columns[i])
		}
	}
	return values, nil
}
func (wf *WithFields) assignValues(columns []string, values []interface{}) error {
	if m, n := len(values), len(columns); m < n {
		return fmt.Errorf("mismatch number of scan values: %d != %d", m, n)
	}
	for i := range columns {
		switch columns[i] {
		case withfields.FieldID:
			value, ok := values[i].(*sql.NullInt64)
			if !ok {
				return fmt.Errorf("unexpected type %T for field id", value)
			}
			wf.ID = int(value.Int64)
		case withfields.FieldExisting:
			if value, ok := values[i].(*sql.NullString); !ok {
				return fmt.Errorf("unexpected type %T for field existing", values[i])
			} else if value.Valid {
				wf.Existing = value.String
			}
		}
	}
	return nil
}
func (wf *WithFields) Update() *WithFieldsUpdateOne {
	return (&WithFieldsClient{config: wf.config}).UpdateOne(wf)
}
func (wf *WithFields) Unwrap() *WithFields {
	tx, ok := wf.config.driver.(*txDriver)
	if !ok {
		panic("ent: WithFields is not a transactional entity")
	}
	wf.config.driver = tx.drv
	return wf
}