- 新增过程巡检按步骤上报、数量不符上报、工位退料功能 - 增加工单工程编号三级归属字段 - 新增物料安全库存与缺货预警 - 新增附件管理、退库单管理模块 - 优化生产看板展示逻辑与前端页面文案 - 清理冗余的工艺路线相关代码与备份文件
570 lines
16 KiB
Go
570 lines
16 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package ent
|
|
|
|
import (
|
|
"bj_power_mes/ent/alert"
|
|
"bj_power_mes/ent/predicate"
|
|
"context"
|
|
"errors"
|
|
"fmt"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
|
"entgo.io/ent/schema/field"
|
|
)
|
|
|
|
// AlertUpdate is the builder for updating Alert entities.
|
|
type AlertUpdate struct {
|
|
config
|
|
hooks []Hook
|
|
mutation *AlertMutation
|
|
modifiers []func(*sql.UpdateBuilder)
|
|
}
|
|
|
|
// Where appends a list predicates to the AlertUpdate builder.
|
|
func (_u *AlertUpdate) Where(ps ...predicate.Alert) *AlertUpdate {
|
|
_u.mutation.Where(ps...)
|
|
return _u
|
|
}
|
|
|
|
// SetRuleId sets the "ruleId" field.
|
|
func (_u *AlertUpdate) SetRuleId(v int) *AlertUpdate {
|
|
_u.mutation.ResetRuleId()
|
|
_u.mutation.SetRuleId(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableRuleId sets the "ruleId" field if the given value is not nil.
|
|
func (_u *AlertUpdate) SetNillableRuleId(v *int) *AlertUpdate {
|
|
if v != nil {
|
|
_u.SetRuleId(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// AddRuleId adds value to the "ruleId" field.
|
|
func (_u *AlertUpdate) AddRuleId(v int) *AlertUpdate {
|
|
_u.mutation.AddRuleId(v)
|
|
return _u
|
|
}
|
|
|
|
// SetType sets the "type" field.
|
|
func (_u *AlertUpdate) SetType(v string) *AlertUpdate {
|
|
_u.mutation.SetType(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableType sets the "type" field if the given value is not nil.
|
|
func (_u *AlertUpdate) SetNillableType(v *string) *AlertUpdate {
|
|
if v != nil {
|
|
_u.SetType(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetTitle sets the "title" field.
|
|
func (_u *AlertUpdate) SetTitle(v string) *AlertUpdate {
|
|
_u.mutation.SetTitle(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableTitle sets the "title" field if the given value is not nil.
|
|
func (_u *AlertUpdate) SetNillableTitle(v *string) *AlertUpdate {
|
|
if v != nil {
|
|
_u.SetTitle(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetContent sets the "content" field.
|
|
func (_u *AlertUpdate) SetContent(v string) *AlertUpdate {
|
|
_u.mutation.SetContent(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableContent sets the "content" field if the given value is not nil.
|
|
func (_u *AlertUpdate) SetNillableContent(v *string) *AlertUpdate {
|
|
if v != nil {
|
|
_u.SetContent(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetRefType sets the "refType" field.
|
|
func (_u *AlertUpdate) SetRefType(v string) *AlertUpdate {
|
|
_u.mutation.SetRefType(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableRefType sets the "refType" field if the given value is not nil.
|
|
func (_u *AlertUpdate) SetNillableRefType(v *string) *AlertUpdate {
|
|
if v != nil {
|
|
_u.SetRefType(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetRefId sets the "refId" field.
|
|
func (_u *AlertUpdate) SetRefId(v string) *AlertUpdate {
|
|
_u.mutation.SetRefId(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableRefId sets the "refId" field if the given value is not nil.
|
|
func (_u *AlertUpdate) SetNillableRefId(v *string) *AlertUpdate {
|
|
if v != nil {
|
|
_u.SetRefId(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetStatus sets the "status" field.
|
|
func (_u *AlertUpdate) SetStatus(v string) *AlertUpdate {
|
|
_u.mutation.SetStatus(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableStatus sets the "status" field if the given value is not nil.
|
|
func (_u *AlertUpdate) SetNillableStatus(v *string) *AlertUpdate {
|
|
if v != nil {
|
|
_u.SetStatus(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetReceiver sets the "receiver" field.
|
|
func (_u *AlertUpdate) SetReceiver(v string) *AlertUpdate {
|
|
_u.mutation.SetReceiver(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableReceiver sets the "receiver" field if the given value is not nil.
|
|
func (_u *AlertUpdate) SetNillableReceiver(v *string) *AlertUpdate {
|
|
if v != nil {
|
|
_u.SetReceiver(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// Mutation returns the AlertMutation object of the builder.
|
|
func (_u *AlertUpdate) Mutation() *AlertMutation {
|
|
return _u.mutation
|
|
}
|
|
|
|
// Save executes the query and returns the number of nodes affected by the update operation.
|
|
func (_u *AlertUpdate) 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 (_u *AlertUpdate) SaveX(ctx context.Context) int {
|
|
affected, err := _u.Save(ctx)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return affected
|
|
}
|
|
|
|
// Exec executes the query.
|
|
func (_u *AlertUpdate) Exec(ctx context.Context) error {
|
|
_, err := _u.Save(ctx)
|
|
return err
|
|
}
|
|
|
|
// ExecX is like Exec, but panics if an error occurs.
|
|
func (_u *AlertUpdate) ExecX(ctx context.Context) {
|
|
if err := _u.Exec(ctx); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
|
|
// check runs all checks and user-defined validators on the builder.
|
|
func (_u *AlertUpdate) check() error {
|
|
if v, ok := _u.mutation.GetType(); ok {
|
|
if err := alert.TypeValidator(v); err != nil {
|
|
return &ValidationError{Name: "type", err: fmt.Errorf(`ent: validator failed for field "Alert.type": %w`, err)}
|
|
}
|
|
}
|
|
if v, ok := _u.mutation.Title(); ok {
|
|
if err := alert.TitleValidator(v); err != nil {
|
|
return &ValidationError{Name: "title", err: fmt.Errorf(`ent: validator failed for field "Alert.title": %w`, err)}
|
|
}
|
|
}
|
|
if v, ok := _u.mutation.Content(); ok {
|
|
if err := alert.ContentValidator(v); err != nil {
|
|
return &ValidationError{Name: "content", err: fmt.Errorf(`ent: validator failed for field "Alert.content": %w`, err)}
|
|
}
|
|
}
|
|
if v, ok := _u.mutation.RefType(); ok {
|
|
if err := alert.RefTypeValidator(v); err != nil {
|
|
return &ValidationError{Name: "refType", err: fmt.Errorf(`ent: validator failed for field "Alert.refType": %w`, err)}
|
|
}
|
|
}
|
|
if v, ok := _u.mutation.RefId(); ok {
|
|
if err := alert.RefIdValidator(v); err != nil {
|
|
return &ValidationError{Name: "refId", err: fmt.Errorf(`ent: validator failed for field "Alert.refId": %w`, err)}
|
|
}
|
|
}
|
|
if v, ok := _u.mutation.Status(); ok {
|
|
if err := alert.StatusValidator(v); err != nil {
|
|
return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Alert.status": %w`, err)}
|
|
}
|
|
}
|
|
if v, ok := _u.mutation.Receiver(); ok {
|
|
if err := alert.ReceiverValidator(v); err != nil {
|
|
return &ValidationError{Name: "receiver", err: fmt.Errorf(`ent: validator failed for field "Alert.receiver": %w`, err)}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
|
|
func (_u *AlertUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AlertUpdate {
|
|
_u.modifiers = append(_u.modifiers, modifiers...)
|
|
return _u
|
|
}
|
|
|
|
func (_u *AlertUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
|
if err := _u.check(); err != nil {
|
|
return _node, err
|
|
}
|
|
_spec := sqlgraph.NewUpdateSpec(alert.Table, alert.Columns, sqlgraph.NewFieldSpec(alert.FieldID, field.TypeInt))
|
|
if ps := _u.mutation.predicates; len(ps) > 0 {
|
|
_spec.Predicate = func(selector *sql.Selector) {
|
|
for i := range ps {
|
|
ps[i](selector)
|
|
}
|
|
}
|
|
}
|
|
if value, ok := _u.mutation.RuleId(); ok {
|
|
_spec.SetField(alert.FieldRuleId, field.TypeInt, value)
|
|
}
|
|
if value, ok := _u.mutation.AddedRuleId(); ok {
|
|
_spec.AddField(alert.FieldRuleId, field.TypeInt, value)
|
|
}
|
|
if value, ok := _u.mutation.GetType(); ok {
|
|
_spec.SetField(alert.FieldType, field.TypeString, value)
|
|
}
|
|
if value, ok := _u.mutation.Title(); ok {
|
|
_spec.SetField(alert.FieldTitle, field.TypeString, value)
|
|
}
|
|
if value, ok := _u.mutation.Content(); ok {
|
|
_spec.SetField(alert.FieldContent, field.TypeString, value)
|
|
}
|
|
if value, ok := _u.mutation.RefType(); ok {
|
|
_spec.SetField(alert.FieldRefType, field.TypeString, value)
|
|
}
|
|
if value, ok := _u.mutation.RefId(); ok {
|
|
_spec.SetField(alert.FieldRefId, field.TypeString, value)
|
|
}
|
|
if value, ok := _u.mutation.Status(); ok {
|
|
_spec.SetField(alert.FieldStatus, field.TypeString, value)
|
|
}
|
|
if value, ok := _u.mutation.Receiver(); ok {
|
|
_spec.SetField(alert.FieldReceiver, field.TypeString, value)
|
|
}
|
|
_spec.AddModifiers(_u.modifiers...)
|
|
if _node, err = sqlgraph.UpdateNodes(ctx, _u.driver, _spec); err != nil {
|
|
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
|
err = &NotFoundError{alert.Label}
|
|
} else if sqlgraph.IsConstraintError(err) {
|
|
err = &ConstraintError{msg: err.Error(), wrap: err}
|
|
}
|
|
return 0, err
|
|
}
|
|
_u.mutation.done = true
|
|
return _node, nil
|
|
}
|
|
|
|
// AlertUpdateOne is the builder for updating a single Alert entity.
|
|
type AlertUpdateOne struct {
|
|
config
|
|
fields []string
|
|
hooks []Hook
|
|
mutation *AlertMutation
|
|
modifiers []func(*sql.UpdateBuilder)
|
|
}
|
|
|
|
// SetRuleId sets the "ruleId" field.
|
|
func (_u *AlertUpdateOne) SetRuleId(v int) *AlertUpdateOne {
|
|
_u.mutation.ResetRuleId()
|
|
_u.mutation.SetRuleId(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableRuleId sets the "ruleId" field if the given value is not nil.
|
|
func (_u *AlertUpdateOne) SetNillableRuleId(v *int) *AlertUpdateOne {
|
|
if v != nil {
|
|
_u.SetRuleId(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// AddRuleId adds value to the "ruleId" field.
|
|
func (_u *AlertUpdateOne) AddRuleId(v int) *AlertUpdateOne {
|
|
_u.mutation.AddRuleId(v)
|
|
return _u
|
|
}
|
|
|
|
// SetType sets the "type" field.
|
|
func (_u *AlertUpdateOne) SetType(v string) *AlertUpdateOne {
|
|
_u.mutation.SetType(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableType sets the "type" field if the given value is not nil.
|
|
func (_u *AlertUpdateOne) SetNillableType(v *string) *AlertUpdateOne {
|
|
if v != nil {
|
|
_u.SetType(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetTitle sets the "title" field.
|
|
func (_u *AlertUpdateOne) SetTitle(v string) *AlertUpdateOne {
|
|
_u.mutation.SetTitle(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableTitle sets the "title" field if the given value is not nil.
|
|
func (_u *AlertUpdateOne) SetNillableTitle(v *string) *AlertUpdateOne {
|
|
if v != nil {
|
|
_u.SetTitle(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetContent sets the "content" field.
|
|
func (_u *AlertUpdateOne) SetContent(v string) *AlertUpdateOne {
|
|
_u.mutation.SetContent(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableContent sets the "content" field if the given value is not nil.
|
|
func (_u *AlertUpdateOne) SetNillableContent(v *string) *AlertUpdateOne {
|
|
if v != nil {
|
|
_u.SetContent(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetRefType sets the "refType" field.
|
|
func (_u *AlertUpdateOne) SetRefType(v string) *AlertUpdateOne {
|
|
_u.mutation.SetRefType(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableRefType sets the "refType" field if the given value is not nil.
|
|
func (_u *AlertUpdateOne) SetNillableRefType(v *string) *AlertUpdateOne {
|
|
if v != nil {
|
|
_u.SetRefType(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetRefId sets the "refId" field.
|
|
func (_u *AlertUpdateOne) SetRefId(v string) *AlertUpdateOne {
|
|
_u.mutation.SetRefId(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableRefId sets the "refId" field if the given value is not nil.
|
|
func (_u *AlertUpdateOne) SetNillableRefId(v *string) *AlertUpdateOne {
|
|
if v != nil {
|
|
_u.SetRefId(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetStatus sets the "status" field.
|
|
func (_u *AlertUpdateOne) SetStatus(v string) *AlertUpdateOne {
|
|
_u.mutation.SetStatus(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableStatus sets the "status" field if the given value is not nil.
|
|
func (_u *AlertUpdateOne) SetNillableStatus(v *string) *AlertUpdateOne {
|
|
if v != nil {
|
|
_u.SetStatus(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetReceiver sets the "receiver" field.
|
|
func (_u *AlertUpdateOne) SetReceiver(v string) *AlertUpdateOne {
|
|
_u.mutation.SetReceiver(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableReceiver sets the "receiver" field if the given value is not nil.
|
|
func (_u *AlertUpdateOne) SetNillableReceiver(v *string) *AlertUpdateOne {
|
|
if v != nil {
|
|
_u.SetReceiver(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// Mutation returns the AlertMutation object of the builder.
|
|
func (_u *AlertUpdateOne) Mutation() *AlertMutation {
|
|
return _u.mutation
|
|
}
|
|
|
|
// Where appends a list predicates to the AlertUpdate builder.
|
|
func (_u *AlertUpdateOne) Where(ps ...predicate.Alert) *AlertUpdateOne {
|
|
_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 (_u *AlertUpdateOne) Select(field string, fields ...string) *AlertUpdateOne {
|
|
_u.fields = append([]string{field}, fields...)
|
|
return _u
|
|
}
|
|
|
|
// Save executes the query and returns the updated Alert entity.
|
|
func (_u *AlertUpdateOne) Save(ctx context.Context) (*Alert, error) {
|
|
return withHooks(ctx, _u.sqlSave, _u.mutation, _u.hooks)
|
|
}
|
|
|
|
// SaveX is like Save, but panics if an error occurs.
|
|
func (_u *AlertUpdateOne) SaveX(ctx context.Context) *Alert {
|
|
node, err := _u.Save(ctx)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return node
|
|
}
|
|
|
|
// Exec executes the query on the entity.
|
|
func (_u *AlertUpdateOne) Exec(ctx context.Context) error {
|
|
_, err := _u.Save(ctx)
|
|
return err
|
|
}
|
|
|
|
// ExecX is like Exec, but panics if an error occurs.
|
|
func (_u *AlertUpdateOne) ExecX(ctx context.Context) {
|
|
if err := _u.Exec(ctx); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
|
|
// check runs all checks and user-defined validators on the builder.
|
|
func (_u *AlertUpdateOne) check() error {
|
|
if v, ok := _u.mutation.GetType(); ok {
|
|
if err := alert.TypeValidator(v); err != nil {
|
|
return &ValidationError{Name: "type", err: fmt.Errorf(`ent: validator failed for field "Alert.type": %w`, err)}
|
|
}
|
|
}
|
|
if v, ok := _u.mutation.Title(); ok {
|
|
if err := alert.TitleValidator(v); err != nil {
|
|
return &ValidationError{Name: "title", err: fmt.Errorf(`ent: validator failed for field "Alert.title": %w`, err)}
|
|
}
|
|
}
|
|
if v, ok := _u.mutation.Content(); ok {
|
|
if err := alert.ContentValidator(v); err != nil {
|
|
return &ValidationError{Name: "content", err: fmt.Errorf(`ent: validator failed for field "Alert.content": %w`, err)}
|
|
}
|
|
}
|
|
if v, ok := _u.mutation.RefType(); ok {
|
|
if err := alert.RefTypeValidator(v); err != nil {
|
|
return &ValidationError{Name: "refType", err: fmt.Errorf(`ent: validator failed for field "Alert.refType": %w`, err)}
|
|
}
|
|
}
|
|
if v, ok := _u.mutation.RefId(); ok {
|
|
if err := alert.RefIdValidator(v); err != nil {
|
|
return &ValidationError{Name: "refId", err: fmt.Errorf(`ent: validator failed for field "Alert.refId": %w`, err)}
|
|
}
|
|
}
|
|
if v, ok := _u.mutation.Status(); ok {
|
|
if err := alert.StatusValidator(v); err != nil {
|
|
return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Alert.status": %w`, err)}
|
|
}
|
|
}
|
|
if v, ok := _u.mutation.Receiver(); ok {
|
|
if err := alert.ReceiverValidator(v); err != nil {
|
|
return &ValidationError{Name: "receiver", err: fmt.Errorf(`ent: validator failed for field "Alert.receiver": %w`, err)}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
|
|
func (_u *AlertUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AlertUpdateOne {
|
|
_u.modifiers = append(_u.modifiers, modifiers...)
|
|
return _u
|
|
}
|
|
|
|
func (_u *AlertUpdateOne) sqlSave(ctx context.Context) (_node *Alert, err error) {
|
|
if err := _u.check(); err != nil {
|
|
return _node, err
|
|
}
|
|
_spec := sqlgraph.NewUpdateSpec(alert.Table, alert.Columns, sqlgraph.NewFieldSpec(alert.FieldID, field.TypeInt))
|
|
id, ok := _u.mutation.ID()
|
|
if !ok {
|
|
return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "Alert.id" for update`)}
|
|
}
|
|
_spec.Node.ID.Value = id
|
|
if fields := _u.fields; len(fields) > 0 {
|
|
_spec.Node.Columns = make([]string, 0, len(fields))
|
|
_spec.Node.Columns = append(_spec.Node.Columns, alert.FieldID)
|
|
for _, f := range fields {
|
|
if !alert.ValidColumn(f) {
|
|
return nil, &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)}
|
|
}
|
|
if f != alert.FieldID {
|
|
_spec.Node.Columns = append(_spec.Node.Columns, f)
|
|
}
|
|
}
|
|
}
|
|
if ps := _u.mutation.predicates; len(ps) > 0 {
|
|
_spec.Predicate = func(selector *sql.Selector) {
|
|
for i := range ps {
|
|
ps[i](selector)
|
|
}
|
|
}
|
|
}
|
|
if value, ok := _u.mutation.RuleId(); ok {
|
|
_spec.SetField(alert.FieldRuleId, field.TypeInt, value)
|
|
}
|
|
if value, ok := _u.mutation.AddedRuleId(); ok {
|
|
_spec.AddField(alert.FieldRuleId, field.TypeInt, value)
|
|
}
|
|
if value, ok := _u.mutation.GetType(); ok {
|
|
_spec.SetField(alert.FieldType, field.TypeString, value)
|
|
}
|
|
if value, ok := _u.mutation.Title(); ok {
|
|
_spec.SetField(alert.FieldTitle, field.TypeString, value)
|
|
}
|
|
if value, ok := _u.mutation.Content(); ok {
|
|
_spec.SetField(alert.FieldContent, field.TypeString, value)
|
|
}
|
|
if value, ok := _u.mutation.RefType(); ok {
|
|
_spec.SetField(alert.FieldRefType, field.TypeString, value)
|
|
}
|
|
if value, ok := _u.mutation.RefId(); ok {
|
|
_spec.SetField(alert.FieldRefId, field.TypeString, value)
|
|
}
|
|
if value, ok := _u.mutation.Status(); ok {
|
|
_spec.SetField(alert.FieldStatus, field.TypeString, value)
|
|
}
|
|
if value, ok := _u.mutation.Receiver(); ok {
|
|
_spec.SetField(alert.FieldReceiver, field.TypeString, value)
|
|
}
|
|
_spec.AddModifiers(_u.modifiers...)
|
|
_node = &Alert{config: _u.config}
|
|
_spec.Assign = _node.assignValues
|
|
_spec.ScanValues = _node.scanValues
|
|
if err = sqlgraph.UpdateNode(ctx, _u.driver, _spec); err != nil {
|
|
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
|
err = &NotFoundError{alert.Label}
|
|
} else if sqlgraph.IsConstraintError(err) {
|
|
err = &ConstraintError{msg: err.Error(), wrap: err}
|
|
}
|
|
return nil, err
|
|
}
|
|
_u.mutation.done = true
|
|
return _node, nil
|
|
}
|