updated deps; regen ent

This commit is contained in:
2022-08-15 12:10:15 +02:00
parent b8b9f82067
commit 657ca32bb3
66 changed files with 1578 additions and 4744 deletions

View File

@@ -1,4 +1,4 @@
// Code generated by entc, DO NOT EDIT.
// Code generated by ent, DO NOT EDIT.
package ent
@@ -96,9 +96,15 @@ func (mc *MessagesCreate) Save(ctx context.Context) (*Messages, error) {
}
mut = mc.hooks[i](mut)
}
if _, err := mut.Mutate(ctx, mc.mutation); err != nil {
v, err := mut.Mutate(ctx, mc.mutation)
if err != nil {
return nil, err
}
nv, ok := v.(*Messages)
if !ok {
return nil, fmt.Errorf("unexpected node type %T returned from MessagesMutation", v)
}
node = nv
}
return node, err
}
@@ -143,7 +149,7 @@ func (mc *MessagesCreate) sqlSave(ctx context.Context) (*Messages, error) {
_node, _spec := mc.createSpec()
if err := sqlgraph.CreateNode(ctx, mc.driver, _spec); err != nil {
if sqlgraph.IsConstraintError(err) {
err = &ConstraintError{err.Error(), err}
err = &ConstraintError{msg: err.Error(), wrap: err}
}
return nil, err
}
@@ -242,7 +248,7 @@ func (mcb *MessagesCreateBulk) Save(ctx context.Context) ([]*Messages, error) {
// Invoke the actual operation on the latest mutation in the chain.
if err = sqlgraph.BatchCreate(ctx, mcb.driver, spec); err != nil {
if sqlgraph.IsConstraintError(err) {
err = &ConstraintError{err.Error(), err}
err = &ConstraintError{msg: err.Error(), wrap: err}
}
}
}
@@ -250,11 +256,11 @@ func (mcb *MessagesCreateBulk) Save(ctx context.Context) ([]*Messages, error) {
return nil, err
}
mutation.id = &nodes[i].ID
mutation.done = true
if specs[i].ID.Value != nil {
id := specs[i].ID.Value.(int64)
nodes[i].ID = int(id)
}
mutation.done = true
return nodes[i], nil
})
for i := len(builder.hooks) - 1; i >= 0; i-- {