chore: Bump ent to 0.11.2 (#2640)

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
This commit is contained in:
Maksim Nabokikh
2022-08-29 11:16:12 +04:00
committed by GitHub
parent c5833e6b6f
commit 7efe1e28a8
88 changed files with 982 additions and 5380 deletions

View File

@@ -1,4 +1,4 @@
// Code generated by entc, DO NOT EDIT.
// Code generated by ent, DO NOT EDIT.
package db
@@ -88,9 +88,15 @@ func (osc *OfflineSessionCreate) Save(ctx context.Context) (*OfflineSession, err
}
mut = osc.hooks[i](mut)
}
if _, err := mut.Mutate(ctx, osc.mutation); err != nil {
v, err := mut.Mutate(ctx, osc.mutation)
if err != nil {
return nil, err
}
nv, ok := v.(*OfflineSession)
if !ok {
return nil, fmt.Errorf("unexpected node type %T returned from OfflineSessionMutation", v)
}
node = nv
}
return node, err
}
@@ -150,7 +156,7 @@ func (osc *OfflineSessionCreate) sqlSave(ctx context.Context) (*OfflineSession,
_node, _spec := osc.createSpec()
if err := sqlgraph.CreateNode(ctx, osc.driver, _spec); err != nil {
if sqlgraph.IsConstraintError(err) {
err = &ConstraintError{err.Error(), err}
err = &ConstraintError{msg: err.Error(), wrap: err}
}
return nil, err
}
@@ -246,7 +252,7 @@ func (oscb *OfflineSessionCreateBulk) Save(ctx context.Context) ([]*OfflineSessi
// Invoke the actual operation on the latest mutation in the chain.
if err = sqlgraph.BatchCreate(ctx, oscb.driver, spec); err != nil {
if sqlgraph.IsConstraintError(err) {
err = &ConstraintError{err.Error(), err}
err = &ConstraintError{msg: err.Error(), wrap: err}
}
}
}