regenerate ent
This commit is contained in:
@@ -24,74 +24,98 @@ type MessagesUpdate struct {
|
||||
}
|
||||
|
||||
// Where appends a list predicates to the MessagesUpdate builder.
|
||||
func (mu *MessagesUpdate) Where(ps ...predicate.Messages) *MessagesUpdate {
|
||||
mu.mutation.Where(ps...)
|
||||
return mu
|
||||
func (_u *MessagesUpdate) Where(ps ...predicate.Messages) *MessagesUpdate {
|
||||
_u.mutation.Where(ps...)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetMessage sets the "message" field.
|
||||
func (mu *MessagesUpdate) SetMessage(s string) *MessagesUpdate {
|
||||
mu.mutation.SetMessage(s)
|
||||
return mu
|
||||
func (_u *MessagesUpdate) SetMessage(v string) *MessagesUpdate {
|
||||
_u.mutation.SetMessage(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableMessage sets the "message" field if the given value is not nil.
|
||||
func (_u *MessagesUpdate) SetNillableMessage(v *string) *MessagesUpdate {
|
||||
if v != nil {
|
||||
_u.SetMessage(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetAllChat sets the "all_chat" field.
|
||||
func (mu *MessagesUpdate) SetAllChat(b bool) *MessagesUpdate {
|
||||
mu.mutation.SetAllChat(b)
|
||||
return mu
|
||||
func (_u *MessagesUpdate) SetAllChat(v bool) *MessagesUpdate {
|
||||
_u.mutation.SetAllChat(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableAllChat sets the "all_chat" field if the given value is not nil.
|
||||
func (_u *MessagesUpdate) SetNillableAllChat(v *bool) *MessagesUpdate {
|
||||
if v != nil {
|
||||
_u.SetAllChat(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetTick sets the "tick" field.
|
||||
func (mu *MessagesUpdate) SetTick(i int) *MessagesUpdate {
|
||||
mu.mutation.ResetTick()
|
||||
mu.mutation.SetTick(i)
|
||||
return mu
|
||||
func (_u *MessagesUpdate) SetTick(v int) *MessagesUpdate {
|
||||
_u.mutation.ResetTick()
|
||||
_u.mutation.SetTick(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// AddTick adds i to the "tick" field.
|
||||
func (mu *MessagesUpdate) AddTick(i int) *MessagesUpdate {
|
||||
mu.mutation.AddTick(i)
|
||||
return mu
|
||||
// SetNillableTick sets the "tick" field if the given value is not nil.
|
||||
func (_u *MessagesUpdate) SetNillableTick(v *int) *MessagesUpdate {
|
||||
if v != nil {
|
||||
_u.SetTick(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// AddTick adds value to the "tick" field.
|
||||
func (_u *MessagesUpdate) AddTick(v int) *MessagesUpdate {
|
||||
_u.mutation.AddTick(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID.
|
||||
func (mu *MessagesUpdate) SetMatchPlayerID(id int) *MessagesUpdate {
|
||||
mu.mutation.SetMatchPlayerID(id)
|
||||
return mu
|
||||
func (_u *MessagesUpdate) SetMatchPlayerID(id int) *MessagesUpdate {
|
||||
_u.mutation.SetMatchPlayerID(id)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID if the given value is not nil.
|
||||
func (mu *MessagesUpdate) SetNillableMatchPlayerID(id *int) *MessagesUpdate {
|
||||
func (_u *MessagesUpdate) SetNillableMatchPlayerID(id *int) *MessagesUpdate {
|
||||
if id != nil {
|
||||
mu = mu.SetMatchPlayerID(*id)
|
||||
_u = _u.SetMatchPlayerID(*id)
|
||||
}
|
||||
return mu
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetMatchPlayer sets the "match_player" edge to the MatchPlayer entity.
|
||||
func (mu *MessagesUpdate) SetMatchPlayer(m *MatchPlayer) *MessagesUpdate {
|
||||
return mu.SetMatchPlayerID(m.ID)
|
||||
func (_u *MessagesUpdate) SetMatchPlayer(v *MatchPlayer) *MessagesUpdate {
|
||||
return _u.SetMatchPlayerID(v.ID)
|
||||
}
|
||||
|
||||
// Mutation returns the MessagesMutation object of the builder.
|
||||
func (mu *MessagesUpdate) Mutation() *MessagesMutation {
|
||||
return mu.mutation
|
||||
func (_u *MessagesUpdate) Mutation() *MessagesMutation {
|
||||
return _u.mutation
|
||||
}
|
||||
|
||||
// ClearMatchPlayer clears the "match_player" edge to the MatchPlayer entity.
|
||||
func (mu *MessagesUpdate) ClearMatchPlayer() *MessagesUpdate {
|
||||
mu.mutation.ClearMatchPlayer()
|
||||
return mu
|
||||
func (_u *MessagesUpdate) ClearMatchPlayer() *MessagesUpdate {
|
||||
_u.mutation.ClearMatchPlayer()
|
||||
return _u
|
||||
}
|
||||
|
||||
// Save executes the query and returns the number of nodes affected by the update operation.
|
||||
func (mu *MessagesUpdate) Save(ctx context.Context) (int, error) {
|
||||
return withHooks(ctx, mu.sqlSave, mu.mutation, mu.hooks)
|
||||
func (_u *MessagesUpdate) Save(ctx context.Context) (int, error) {
|
||||
return withHooks(ctx, _u.sqlSave, _u.mutation, _u.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
func (mu *MessagesUpdate) SaveX(ctx context.Context) int {
|
||||
affected, err := mu.Save(ctx)
|
||||
func (_u *MessagesUpdate) SaveX(ctx context.Context) int {
|
||||
affected, err := _u.Save(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -99,46 +123,46 @@ func (mu *MessagesUpdate) SaveX(ctx context.Context) int {
|
||||
}
|
||||
|
||||
// Exec executes the query.
|
||||
func (mu *MessagesUpdate) Exec(ctx context.Context) error {
|
||||
_, err := mu.Save(ctx)
|
||||
func (_u *MessagesUpdate) Exec(ctx context.Context) error {
|
||||
_, err := _u.Save(ctx)
|
||||
return err
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
func (mu *MessagesUpdate) ExecX(ctx context.Context) {
|
||||
if err := mu.Exec(ctx); err != nil {
|
||||
func (_u *MessagesUpdate) ExecX(ctx context.Context) {
|
||||
if err := _u.Exec(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
|
||||
func (mu *MessagesUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MessagesUpdate {
|
||||
mu.modifiers = append(mu.modifiers, modifiers...)
|
||||
return mu
|
||||
func (_u *MessagesUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MessagesUpdate {
|
||||
_u.modifiers = append(_u.modifiers, modifiers...)
|
||||
return _u
|
||||
}
|
||||
|
||||
func (mu *MessagesUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
func (_u *MessagesUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
_spec := sqlgraph.NewUpdateSpec(messages.Table, messages.Columns, sqlgraph.NewFieldSpec(messages.FieldID, field.TypeInt))
|
||||
if ps := mu.mutation.predicates; len(ps) > 0 {
|
||||
if ps := _u.mutation.predicates; len(ps) > 0 {
|
||||
_spec.Predicate = func(selector *sql.Selector) {
|
||||
for i := range ps {
|
||||
ps[i](selector)
|
||||
}
|
||||
}
|
||||
}
|
||||
if value, ok := mu.mutation.Message(); ok {
|
||||
if value, ok := _u.mutation.Message(); ok {
|
||||
_spec.SetField(messages.FieldMessage, field.TypeString, value)
|
||||
}
|
||||
if value, ok := mu.mutation.AllChat(); ok {
|
||||
if value, ok := _u.mutation.AllChat(); ok {
|
||||
_spec.SetField(messages.FieldAllChat, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := mu.mutation.Tick(); ok {
|
||||
if value, ok := _u.mutation.Tick(); ok {
|
||||
_spec.SetField(messages.FieldTick, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := mu.mutation.AddedTick(); ok {
|
||||
if value, ok := _u.mutation.AddedTick(); ok {
|
||||
_spec.AddField(messages.FieldTick, field.TypeInt, value)
|
||||
}
|
||||
if mu.mutation.MatchPlayerCleared() {
|
||||
if _u.mutation.MatchPlayerCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.M2O,
|
||||
Inverse: true,
|
||||
@@ -151,7 +175,7 @@ func (mu *MessagesUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
}
|
||||
if nodes := mu.mutation.MatchPlayerIDs(); len(nodes) > 0 {
|
||||
if nodes := _u.mutation.MatchPlayerIDs(); len(nodes) > 0 {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.M2O,
|
||||
Inverse: true,
|
||||
@@ -167,8 +191,8 @@ func (mu *MessagesUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_spec.AddModifiers(mu.modifiers...)
|
||||
if n, err = sqlgraph.UpdateNodes(ctx, mu.driver, _spec); err != nil {
|
||||
_spec.AddModifiers(_u.modifiers...)
|
||||
if _node, err = sqlgraph.UpdateNodes(ctx, _u.driver, _spec); err != nil {
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
err = &NotFoundError{messages.Label}
|
||||
} else if sqlgraph.IsConstraintError(err) {
|
||||
@@ -176,8 +200,8 @@ func (mu *MessagesUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
}
|
||||
return 0, err
|
||||
}
|
||||
mu.mutation.done = true
|
||||
return n, nil
|
||||
_u.mutation.done = true
|
||||
return _node, nil
|
||||
}
|
||||
|
||||
// MessagesUpdateOne is the builder for updating a single Messages entity.
|
||||
@@ -190,81 +214,105 @@ type MessagesUpdateOne struct {
|
||||
}
|
||||
|
||||
// SetMessage sets the "message" field.
|
||||
func (muo *MessagesUpdateOne) SetMessage(s string) *MessagesUpdateOne {
|
||||
muo.mutation.SetMessage(s)
|
||||
return muo
|
||||
func (_u *MessagesUpdateOne) SetMessage(v string) *MessagesUpdateOne {
|
||||
_u.mutation.SetMessage(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableMessage sets the "message" field if the given value is not nil.
|
||||
func (_u *MessagesUpdateOne) SetNillableMessage(v *string) *MessagesUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetMessage(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetAllChat sets the "all_chat" field.
|
||||
func (muo *MessagesUpdateOne) SetAllChat(b bool) *MessagesUpdateOne {
|
||||
muo.mutation.SetAllChat(b)
|
||||
return muo
|
||||
func (_u *MessagesUpdateOne) SetAllChat(v bool) *MessagesUpdateOne {
|
||||
_u.mutation.SetAllChat(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableAllChat sets the "all_chat" field if the given value is not nil.
|
||||
func (_u *MessagesUpdateOne) SetNillableAllChat(v *bool) *MessagesUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetAllChat(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetTick sets the "tick" field.
|
||||
func (muo *MessagesUpdateOne) SetTick(i int) *MessagesUpdateOne {
|
||||
muo.mutation.ResetTick()
|
||||
muo.mutation.SetTick(i)
|
||||
return muo
|
||||
func (_u *MessagesUpdateOne) SetTick(v int) *MessagesUpdateOne {
|
||||
_u.mutation.ResetTick()
|
||||
_u.mutation.SetTick(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// AddTick adds i to the "tick" field.
|
||||
func (muo *MessagesUpdateOne) AddTick(i int) *MessagesUpdateOne {
|
||||
muo.mutation.AddTick(i)
|
||||
return muo
|
||||
// SetNillableTick sets the "tick" field if the given value is not nil.
|
||||
func (_u *MessagesUpdateOne) SetNillableTick(v *int) *MessagesUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetTick(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// AddTick adds value to the "tick" field.
|
||||
func (_u *MessagesUpdateOne) AddTick(v int) *MessagesUpdateOne {
|
||||
_u.mutation.AddTick(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID.
|
||||
func (muo *MessagesUpdateOne) SetMatchPlayerID(id int) *MessagesUpdateOne {
|
||||
muo.mutation.SetMatchPlayerID(id)
|
||||
return muo
|
||||
func (_u *MessagesUpdateOne) SetMatchPlayerID(id int) *MessagesUpdateOne {
|
||||
_u.mutation.SetMatchPlayerID(id)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID if the given value is not nil.
|
||||
func (muo *MessagesUpdateOne) SetNillableMatchPlayerID(id *int) *MessagesUpdateOne {
|
||||
func (_u *MessagesUpdateOne) SetNillableMatchPlayerID(id *int) *MessagesUpdateOne {
|
||||
if id != nil {
|
||||
muo = muo.SetMatchPlayerID(*id)
|
||||
_u = _u.SetMatchPlayerID(*id)
|
||||
}
|
||||
return muo
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetMatchPlayer sets the "match_player" edge to the MatchPlayer entity.
|
||||
func (muo *MessagesUpdateOne) SetMatchPlayer(m *MatchPlayer) *MessagesUpdateOne {
|
||||
return muo.SetMatchPlayerID(m.ID)
|
||||
func (_u *MessagesUpdateOne) SetMatchPlayer(v *MatchPlayer) *MessagesUpdateOne {
|
||||
return _u.SetMatchPlayerID(v.ID)
|
||||
}
|
||||
|
||||
// Mutation returns the MessagesMutation object of the builder.
|
||||
func (muo *MessagesUpdateOne) Mutation() *MessagesMutation {
|
||||
return muo.mutation
|
||||
func (_u *MessagesUpdateOne) Mutation() *MessagesMutation {
|
||||
return _u.mutation
|
||||
}
|
||||
|
||||
// ClearMatchPlayer clears the "match_player" edge to the MatchPlayer entity.
|
||||
func (muo *MessagesUpdateOne) ClearMatchPlayer() *MessagesUpdateOne {
|
||||
muo.mutation.ClearMatchPlayer()
|
||||
return muo
|
||||
func (_u *MessagesUpdateOne) ClearMatchPlayer() *MessagesUpdateOne {
|
||||
_u.mutation.ClearMatchPlayer()
|
||||
return _u
|
||||
}
|
||||
|
||||
// Where appends a list predicates to the MessagesUpdate builder.
|
||||
func (muo *MessagesUpdateOne) Where(ps ...predicate.Messages) *MessagesUpdateOne {
|
||||
muo.mutation.Where(ps...)
|
||||
return muo
|
||||
func (_u *MessagesUpdateOne) Where(ps ...predicate.Messages) *MessagesUpdateOne {
|
||||
_u.mutation.Where(ps...)
|
||||
return _u
|
||||
}
|
||||
|
||||
// Select allows selecting one or more fields (columns) of the returned entity.
|
||||
// The default is selecting all fields defined in the entity schema.
|
||||
func (muo *MessagesUpdateOne) Select(field string, fields ...string) *MessagesUpdateOne {
|
||||
muo.fields = append([]string{field}, fields...)
|
||||
return muo
|
||||
func (_u *MessagesUpdateOne) Select(field string, fields ...string) *MessagesUpdateOne {
|
||||
_u.fields = append([]string{field}, fields...)
|
||||
return _u
|
||||
}
|
||||
|
||||
// Save executes the query and returns the updated Messages entity.
|
||||
func (muo *MessagesUpdateOne) Save(ctx context.Context) (*Messages, error) {
|
||||
return withHooks(ctx, muo.sqlSave, muo.mutation, muo.hooks)
|
||||
func (_u *MessagesUpdateOne) Save(ctx context.Context) (*Messages, error) {
|
||||
return withHooks(ctx, _u.sqlSave, _u.mutation, _u.hooks)
|
||||
}
|
||||
|
||||
// SaveX is like Save, but panics if an error occurs.
|
||||
func (muo *MessagesUpdateOne) SaveX(ctx context.Context) *Messages {
|
||||
node, err := muo.Save(ctx)
|
||||
func (_u *MessagesUpdateOne) SaveX(ctx context.Context) *Messages {
|
||||
node, err := _u.Save(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -272,32 +320,32 @@ func (muo *MessagesUpdateOne) SaveX(ctx context.Context) *Messages {
|
||||
}
|
||||
|
||||
// Exec executes the query on the entity.
|
||||
func (muo *MessagesUpdateOne) Exec(ctx context.Context) error {
|
||||
_, err := muo.Save(ctx)
|
||||
func (_u *MessagesUpdateOne) Exec(ctx context.Context) error {
|
||||
_, err := _u.Save(ctx)
|
||||
return err
|
||||
}
|
||||
|
||||
// ExecX is like Exec, but panics if an error occurs.
|
||||
func (muo *MessagesUpdateOne) ExecX(ctx context.Context) {
|
||||
if err := muo.Exec(ctx); err != nil {
|
||||
func (_u *MessagesUpdateOne) ExecX(ctx context.Context) {
|
||||
if err := _u.Exec(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
|
||||
func (muo *MessagesUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MessagesUpdateOne {
|
||||
muo.modifiers = append(muo.modifiers, modifiers...)
|
||||
return muo
|
||||
func (_u *MessagesUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MessagesUpdateOne {
|
||||
_u.modifiers = append(_u.modifiers, modifiers...)
|
||||
return _u
|
||||
}
|
||||
|
||||
func (muo *MessagesUpdateOne) sqlSave(ctx context.Context) (_node *Messages, err error) {
|
||||
func (_u *MessagesUpdateOne) sqlSave(ctx context.Context) (_node *Messages, err error) {
|
||||
_spec := sqlgraph.NewUpdateSpec(messages.Table, messages.Columns, sqlgraph.NewFieldSpec(messages.FieldID, field.TypeInt))
|
||||
id, ok := muo.mutation.ID()
|
||||
id, ok := _u.mutation.ID()
|
||||
if !ok {
|
||||
return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "Messages.id" for update`)}
|
||||
}
|
||||
_spec.Node.ID.Value = id
|
||||
if fields := muo.fields; len(fields) > 0 {
|
||||
if fields := _u.fields; len(fields) > 0 {
|
||||
_spec.Node.Columns = make([]string, 0, len(fields))
|
||||
_spec.Node.Columns = append(_spec.Node.Columns, messages.FieldID)
|
||||
for _, f := range fields {
|
||||
@@ -309,26 +357,26 @@ func (muo *MessagesUpdateOne) sqlSave(ctx context.Context) (_node *Messages, err
|
||||
}
|
||||
}
|
||||
}
|
||||
if ps := muo.mutation.predicates; len(ps) > 0 {
|
||||
if ps := _u.mutation.predicates; len(ps) > 0 {
|
||||
_spec.Predicate = func(selector *sql.Selector) {
|
||||
for i := range ps {
|
||||
ps[i](selector)
|
||||
}
|
||||
}
|
||||
}
|
||||
if value, ok := muo.mutation.Message(); ok {
|
||||
if value, ok := _u.mutation.Message(); ok {
|
||||
_spec.SetField(messages.FieldMessage, field.TypeString, value)
|
||||
}
|
||||
if value, ok := muo.mutation.AllChat(); ok {
|
||||
if value, ok := _u.mutation.AllChat(); ok {
|
||||
_spec.SetField(messages.FieldAllChat, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := muo.mutation.Tick(); ok {
|
||||
if value, ok := _u.mutation.Tick(); ok {
|
||||
_spec.SetField(messages.FieldTick, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := muo.mutation.AddedTick(); ok {
|
||||
if value, ok := _u.mutation.AddedTick(); ok {
|
||||
_spec.AddField(messages.FieldTick, field.TypeInt, value)
|
||||
}
|
||||
if muo.mutation.MatchPlayerCleared() {
|
||||
if _u.mutation.MatchPlayerCleared() {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.M2O,
|
||||
Inverse: true,
|
||||
@@ -341,7 +389,7 @@ func (muo *MessagesUpdateOne) sqlSave(ctx context.Context) (_node *Messages, err
|
||||
}
|
||||
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
||||
}
|
||||
if nodes := muo.mutation.MatchPlayerIDs(); len(nodes) > 0 {
|
||||
if nodes := _u.mutation.MatchPlayerIDs(); len(nodes) > 0 {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.M2O,
|
||||
Inverse: true,
|
||||
@@ -357,11 +405,11 @@ func (muo *MessagesUpdateOne) sqlSave(ctx context.Context) (_node *Messages, err
|
||||
}
|
||||
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
||||
}
|
||||
_spec.AddModifiers(muo.modifiers...)
|
||||
_node = &Messages{config: muo.config}
|
||||
_spec.AddModifiers(_u.modifiers...)
|
||||
_node = &Messages{config: _u.config}
|
||||
_spec.Assign = _node.assignValues
|
||||
_spec.ScanValues = _node.scanValues
|
||||
if err = sqlgraph.UpdateNode(ctx, muo.driver, _spec); err != nil {
|
||||
if err = sqlgraph.UpdateNode(ctx, _u.driver, _spec); err != nil {
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
err = &NotFoundError{messages.Label}
|
||||
} else if sqlgraph.IsConstraintError(err) {
|
||||
@@ -369,6 +417,6 @@ func (muo *MessagesUpdateOne) sqlSave(ctx context.Context) (_node *Messages, err
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
muo.mutation.done = true
|
||||
_u.mutation.done = true
|
||||
return _node, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user