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
@@ -102,9 +102,15 @@ func (wc *WeaponCreate) Save(ctx context.Context) (*Weapon, error) {
}
mut = wc.hooks[i](mut)
}
if _, err := mut.Mutate(ctx, wc.mutation); err != nil {
v, err := mut.Mutate(ctx, wc.mutation)
if err != nil {
return nil, err
}
nv, ok := v.(*Weapon)
if !ok {
return nil, fmt.Errorf("unexpected node type %T returned from WeaponMutation", v)
}
node = nv
}
return node, err
}
@@ -152,7 +158,7 @@ func (wc *WeaponCreate) sqlSave(ctx context.Context) (*Weapon, error) {
_node, _spec := wc.createSpec()
if err := sqlgraph.CreateNode(ctx, wc.driver, _spec); err != nil {
if sqlgraph.IsConstraintError(err) {
err = &ConstraintError{err.Error(), err}
err = &ConstraintError{msg: err.Error(), wrap: err}
}
return nil, err
}
@@ -259,7 +265,7 @@ func (wcb *WeaponCreateBulk) Save(ctx context.Context) ([]*Weapon, error) {
// Invoke the actual operation on the latest mutation in the chain.
if err = sqlgraph.BatchCreate(ctx, wcb.driver, spec); err != nil {
if sqlgraph.IsConstraintError(err) {
err = &ConstraintError{err.Error(), err}
err = &ConstraintError{msg: err.Error(), wrap: err}
}
}
}
@@ -267,11 +273,11 @@ func (wcb *WeaponCreateBulk) Save(ctx context.Context) ([]*Weapon, 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-- {