530 lines
16 KiB
Go
530 lines
16 KiB
Go
// Copyright 2019-present Facebook Inc. All rights reserved.
|
|
// This source code is licensed under the Apache 2.0 license found
|
|
// in the LICENSE file in the root directory of this source tree.
|
|
|
|
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package ent
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
"fmt"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
|
"entgo.io/ent/entc/integration/edgeschema/ent/attachedfile"
|
|
"entgo.io/ent/entc/integration/edgeschema/ent/file"
|
|
"entgo.io/ent/entc/integration/edgeschema/ent/predicate"
|
|
"entgo.io/ent/entc/integration/edgeschema/ent/process"
|
|
"entgo.io/ent/schema/field"
|
|
)
|
|
|
|
// ProcessUpdate is the builder for updating Process entities.
|
|
type ProcessUpdate struct {
|
|
config
|
|
hooks []Hook
|
|
mutation *ProcessMutation
|
|
}
|
|
|
|
// Where appends a list predicates to the ProcessUpdate builder.
|
|
func (_u *ProcessUpdate) Where(ps ...predicate.Process) *ProcessUpdate {
|
|
_u.mutation.Where(ps...)
|
|
return _u
|
|
}
|
|
|
|
// AddFileIDs adds the "files" edge to the File entity by IDs.
|
|
func (_u *ProcessUpdate) AddFileIDs(ids ...int) *ProcessUpdate {
|
|
_u.mutation.AddFileIDs(ids...)
|
|
return _u
|
|
}
|
|
|
|
// AddFiles adds the "files" edges to the File entity.
|
|
func (_u *ProcessUpdate) AddFiles(v ...*File) *ProcessUpdate {
|
|
ids := make([]int, len(v))
|
|
for i := range v {
|
|
ids[i] = v[i].ID
|
|
}
|
|
return _u.AddFileIDs(ids...)
|
|
}
|
|
|
|
// AddAttachedFileIDs adds the "attached_files" edge to the AttachedFile entity by IDs.
|
|
func (_u *ProcessUpdate) AddAttachedFileIDs(ids ...int) *ProcessUpdate {
|
|
_u.mutation.AddAttachedFileIDs(ids...)
|
|
return _u
|
|
}
|
|
|
|
// AddAttachedFiles adds the "attached_files" edges to the AttachedFile entity.
|
|
func (_u *ProcessUpdate) AddAttachedFiles(v ...*AttachedFile) *ProcessUpdate {
|
|
ids := make([]int, len(v))
|
|
for i := range v {
|
|
ids[i] = v[i].ID
|
|
}
|
|
return _u.AddAttachedFileIDs(ids...)
|
|
}
|
|
|
|
// Mutation returns the ProcessMutation object of the builder.
|
|
func (_u *ProcessUpdate) Mutation() *ProcessMutation {
|
|
return _u.mutation
|
|
}
|
|
|
|
// ClearFiles clears all "files" edges to the File entity.
|
|
func (_u *ProcessUpdate) ClearFiles() *ProcessUpdate {
|
|
_u.mutation.ClearFiles()
|
|
return _u
|
|
}
|
|
|
|
// RemoveFileIDs removes the "files" edge to File entities by IDs.
|
|
func (_u *ProcessUpdate) RemoveFileIDs(ids ...int) *ProcessUpdate {
|
|
_u.mutation.RemoveFileIDs(ids...)
|
|
return _u
|
|
}
|
|
|
|
// RemoveFiles removes "files" edges to File entities.
|
|
func (_u *ProcessUpdate) RemoveFiles(v ...*File) *ProcessUpdate {
|
|
ids := make([]int, len(v))
|
|
for i := range v {
|
|
ids[i] = v[i].ID
|
|
}
|
|
return _u.RemoveFileIDs(ids...)
|
|
}
|
|
|
|
// ClearAttachedFiles clears all "attached_files" edges to the AttachedFile entity.
|
|
func (_u *ProcessUpdate) ClearAttachedFiles() *ProcessUpdate {
|
|
_u.mutation.ClearAttachedFiles()
|
|
return _u
|
|
}
|
|
|
|
// RemoveAttachedFileIDs removes the "attached_files" edge to AttachedFile entities by IDs.
|
|
func (_u *ProcessUpdate) RemoveAttachedFileIDs(ids ...int) *ProcessUpdate {
|
|
_u.mutation.RemoveAttachedFileIDs(ids...)
|
|
return _u
|
|
}
|
|
|
|
// RemoveAttachedFiles removes "attached_files" edges to AttachedFile entities.
|
|
func (_u *ProcessUpdate) RemoveAttachedFiles(v ...*AttachedFile) *ProcessUpdate {
|
|
ids := make([]int, len(v))
|
|
for i := range v {
|
|
ids[i] = v[i].ID
|
|
}
|
|
return _u.RemoveAttachedFileIDs(ids...)
|
|
}
|
|
|
|
// Save executes the query and returns the number of nodes affected by the update operation.
|
|
func (_u *ProcessUpdate) 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 *ProcessUpdate) SaveX(ctx context.Context) int {
|
|
affected, err := _u.Save(ctx)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return affected
|
|
}
|
|
|
|
// Exec executes the query.
|
|
func (_u *ProcessUpdate) Exec(ctx context.Context) error {
|
|
_, err := _u.Save(ctx)
|
|
return err
|
|
}
|
|
|
|
// ExecX is like Exec, but panics if an error occurs.
|
|
func (_u *ProcessUpdate) ExecX(ctx context.Context) {
|
|
if err := _u.Exec(ctx); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
|
|
func (_u *ProcessUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
|
_spec := sqlgraph.NewUpdateSpec(process.Table, process.Columns, sqlgraph.NewFieldSpec(process.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 _u.mutation.FilesCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.M2M,
|
|
Inverse: false,
|
|
Table: process.FilesTable,
|
|
Columns: process.FilesPrimaryKey,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
IDSpec: sqlgraph.NewFieldSpec(file.FieldID, field.TypeInt),
|
|
},
|
|
}
|
|
createE := &AttachedFileCreate{config: _u.config, mutation: newAttachedFileMutation(_u.config, OpCreate)}
|
|
createE.defaults()
|
|
_, specE := createE.createSpec()
|
|
edge.Target.Fields = specE.Fields
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
if nodes := _u.mutation.RemovedFilesIDs(); len(nodes) > 0 && !_u.mutation.FilesCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.M2M,
|
|
Inverse: false,
|
|
Table: process.FilesTable,
|
|
Columns: process.FilesPrimaryKey,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
IDSpec: sqlgraph.NewFieldSpec(file.FieldID, field.TypeInt),
|
|
},
|
|
}
|
|
for _, k := range nodes {
|
|
edge.Target.Nodes = append(edge.Target.Nodes, k)
|
|
}
|
|
createE := &AttachedFileCreate{config: _u.config, mutation: newAttachedFileMutation(_u.config, OpCreate)}
|
|
createE.defaults()
|
|
_, specE := createE.createSpec()
|
|
edge.Target.Fields = specE.Fields
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
if nodes := _u.mutation.FilesIDs(); len(nodes) > 0 {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.M2M,
|
|
Inverse: false,
|
|
Table: process.FilesTable,
|
|
Columns: process.FilesPrimaryKey,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
IDSpec: sqlgraph.NewFieldSpec(file.FieldID, field.TypeInt),
|
|
},
|
|
}
|
|
for _, k := range nodes {
|
|
edge.Target.Nodes = append(edge.Target.Nodes, k)
|
|
}
|
|
createE := &AttachedFileCreate{config: _u.config, mutation: newAttachedFileMutation(_u.config, OpCreate)}
|
|
createE.defaults()
|
|
_, specE := createE.createSpec()
|
|
edge.Target.Fields = specE.Fields
|
|
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
|
}
|
|
if _u.mutation.AttachedFilesCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: true,
|
|
Table: process.AttachedFilesTable,
|
|
Columns: []string{process.AttachedFilesColumn},
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
IDSpec: sqlgraph.NewFieldSpec(attachedfile.FieldID, field.TypeInt),
|
|
},
|
|
}
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
if nodes := _u.mutation.RemovedAttachedFilesIDs(); len(nodes) > 0 && !_u.mutation.AttachedFilesCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: true,
|
|
Table: process.AttachedFilesTable,
|
|
Columns: []string{process.AttachedFilesColumn},
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
IDSpec: sqlgraph.NewFieldSpec(attachedfile.FieldID, field.TypeInt),
|
|
},
|
|
}
|
|
for _, k := range nodes {
|
|
edge.Target.Nodes = append(edge.Target.Nodes, k)
|
|
}
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
if nodes := _u.mutation.AttachedFilesIDs(); len(nodes) > 0 {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: true,
|
|
Table: process.AttachedFilesTable,
|
|
Columns: []string{process.AttachedFilesColumn},
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
IDSpec: sqlgraph.NewFieldSpec(attachedfile.FieldID, field.TypeInt),
|
|
},
|
|
}
|
|
for _, k := range nodes {
|
|
edge.Target.Nodes = append(edge.Target.Nodes, k)
|
|
}
|
|
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
|
}
|
|
if _node, err = sqlgraph.UpdateNodes(ctx, _u.driver, _spec); err != nil {
|
|
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
|
err = &NotFoundError{process.Label}
|
|
} else if sqlgraph.IsConstraintError(err) {
|
|
err = &ConstraintError{msg: err.Error(), wrap: err}
|
|
}
|
|
return 0, err
|
|
}
|
|
_u.mutation.done = true
|
|
return _node, nil
|
|
}
|
|
|
|
// ProcessUpdateOne is the builder for updating a single Process entity.
|
|
type ProcessUpdateOne struct {
|
|
config
|
|
fields []string
|
|
hooks []Hook
|
|
mutation *ProcessMutation
|
|
}
|
|
|
|
// AddFileIDs adds the "files" edge to the File entity by IDs.
|
|
func (_u *ProcessUpdateOne) AddFileIDs(ids ...int) *ProcessUpdateOne {
|
|
_u.mutation.AddFileIDs(ids...)
|
|
return _u
|
|
}
|
|
|
|
// AddFiles adds the "files" edges to the File entity.
|
|
func (_u *ProcessUpdateOne) AddFiles(v ...*File) *ProcessUpdateOne {
|
|
ids := make([]int, len(v))
|
|
for i := range v {
|
|
ids[i] = v[i].ID
|
|
}
|
|
return _u.AddFileIDs(ids...)
|
|
}
|
|
|
|
// AddAttachedFileIDs adds the "attached_files" edge to the AttachedFile entity by IDs.
|
|
func (_u *ProcessUpdateOne) AddAttachedFileIDs(ids ...int) *ProcessUpdateOne {
|
|
_u.mutation.AddAttachedFileIDs(ids...)
|
|
return _u
|
|
}
|
|
|
|
// AddAttachedFiles adds the "attached_files" edges to the AttachedFile entity.
|
|
func (_u *ProcessUpdateOne) AddAttachedFiles(v ...*AttachedFile) *ProcessUpdateOne {
|
|
ids := make([]int, len(v))
|
|
for i := range v {
|
|
ids[i] = v[i].ID
|
|
}
|
|
return _u.AddAttachedFileIDs(ids...)
|
|
}
|
|
|
|
// Mutation returns the ProcessMutation object of the builder.
|
|
func (_u *ProcessUpdateOne) Mutation() *ProcessMutation {
|
|
return _u.mutation
|
|
}
|
|
|
|
// ClearFiles clears all "files" edges to the File entity.
|
|
func (_u *ProcessUpdateOne) ClearFiles() *ProcessUpdateOne {
|
|
_u.mutation.ClearFiles()
|
|
return _u
|
|
}
|
|
|
|
// RemoveFileIDs removes the "files" edge to File entities by IDs.
|
|
func (_u *ProcessUpdateOne) RemoveFileIDs(ids ...int) *ProcessUpdateOne {
|
|
_u.mutation.RemoveFileIDs(ids...)
|
|
return _u
|
|
}
|
|
|
|
// RemoveFiles removes "files" edges to File entities.
|
|
func (_u *ProcessUpdateOne) RemoveFiles(v ...*File) *ProcessUpdateOne {
|
|
ids := make([]int, len(v))
|
|
for i := range v {
|
|
ids[i] = v[i].ID
|
|
}
|
|
return _u.RemoveFileIDs(ids...)
|
|
}
|
|
|
|
// ClearAttachedFiles clears all "attached_files" edges to the AttachedFile entity.
|
|
func (_u *ProcessUpdateOne) ClearAttachedFiles() *ProcessUpdateOne {
|
|
_u.mutation.ClearAttachedFiles()
|
|
return _u
|
|
}
|
|
|
|
// RemoveAttachedFileIDs removes the "attached_files" edge to AttachedFile entities by IDs.
|
|
func (_u *ProcessUpdateOne) RemoveAttachedFileIDs(ids ...int) *ProcessUpdateOne {
|
|
_u.mutation.RemoveAttachedFileIDs(ids...)
|
|
return _u
|
|
}
|
|
|
|
// RemoveAttachedFiles removes "attached_files" edges to AttachedFile entities.
|
|
func (_u *ProcessUpdateOne) RemoveAttachedFiles(v ...*AttachedFile) *ProcessUpdateOne {
|
|
ids := make([]int, len(v))
|
|
for i := range v {
|
|
ids[i] = v[i].ID
|
|
}
|
|
return _u.RemoveAttachedFileIDs(ids...)
|
|
}
|
|
|
|
// Where appends a list predicates to the ProcessUpdate builder.
|
|
func (_u *ProcessUpdateOne) Where(ps ...predicate.Process) *ProcessUpdateOne {
|
|
_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 *ProcessUpdateOne) Select(field string, fields ...string) *ProcessUpdateOne {
|
|
_u.fields = append([]string{field}, fields...)
|
|
return _u
|
|
}
|
|
|
|
// Save executes the query and returns the updated Process entity.
|
|
func (_u *ProcessUpdateOne) Save(ctx context.Context) (*Process, error) {
|
|
return withHooks(ctx, _u.sqlSave, _u.mutation, _u.hooks)
|
|
}
|
|
|
|
// SaveX is like Save, but panics if an error occurs.
|
|
func (_u *ProcessUpdateOne) SaveX(ctx context.Context) *Process {
|
|
node, err := _u.Save(ctx)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return node
|
|
}
|
|
|
|
// Exec executes the query on the entity.
|
|
func (_u *ProcessUpdateOne) Exec(ctx context.Context) error {
|
|
_, err := _u.Save(ctx)
|
|
return err
|
|
}
|
|
|
|
// ExecX is like Exec, but panics if an error occurs.
|
|
func (_u *ProcessUpdateOne) ExecX(ctx context.Context) {
|
|
if err := _u.Exec(ctx); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|
|
|
|
func (_u *ProcessUpdateOne) sqlSave(ctx context.Context) (_node *Process, err error) {
|
|
_spec := sqlgraph.NewUpdateSpec(process.Table, process.Columns, sqlgraph.NewFieldSpec(process.FieldID, field.TypeInt))
|
|
id, ok := _u.mutation.ID()
|
|
if !ok {
|
|
return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "Process.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, process.FieldID)
|
|
for _, f := range fields {
|
|
if !process.ValidColumn(f) {
|
|
return nil, &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)}
|
|
}
|
|
if f != process.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 _u.mutation.FilesCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.M2M,
|
|
Inverse: false,
|
|
Table: process.FilesTable,
|
|
Columns: process.FilesPrimaryKey,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
IDSpec: sqlgraph.NewFieldSpec(file.FieldID, field.TypeInt),
|
|
},
|
|
}
|
|
createE := &AttachedFileCreate{config: _u.config, mutation: newAttachedFileMutation(_u.config, OpCreate)}
|
|
createE.defaults()
|
|
_, specE := createE.createSpec()
|
|
edge.Target.Fields = specE.Fields
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
if nodes := _u.mutation.RemovedFilesIDs(); len(nodes) > 0 && !_u.mutation.FilesCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.M2M,
|
|
Inverse: false,
|
|
Table: process.FilesTable,
|
|
Columns: process.FilesPrimaryKey,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
IDSpec: sqlgraph.NewFieldSpec(file.FieldID, field.TypeInt),
|
|
},
|
|
}
|
|
for _, k := range nodes {
|
|
edge.Target.Nodes = append(edge.Target.Nodes, k)
|
|
}
|
|
createE := &AttachedFileCreate{config: _u.config, mutation: newAttachedFileMutation(_u.config, OpCreate)}
|
|
createE.defaults()
|
|
_, specE := createE.createSpec()
|
|
edge.Target.Fields = specE.Fields
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
if nodes := _u.mutation.FilesIDs(); len(nodes) > 0 {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.M2M,
|
|
Inverse: false,
|
|
Table: process.FilesTable,
|
|
Columns: process.FilesPrimaryKey,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
IDSpec: sqlgraph.NewFieldSpec(file.FieldID, field.TypeInt),
|
|
},
|
|
}
|
|
for _, k := range nodes {
|
|
edge.Target.Nodes = append(edge.Target.Nodes, k)
|
|
}
|
|
createE := &AttachedFileCreate{config: _u.config, mutation: newAttachedFileMutation(_u.config, OpCreate)}
|
|
createE.defaults()
|
|
_, specE := createE.createSpec()
|
|
edge.Target.Fields = specE.Fields
|
|
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
|
}
|
|
if _u.mutation.AttachedFilesCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: true,
|
|
Table: process.AttachedFilesTable,
|
|
Columns: []string{process.AttachedFilesColumn},
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
IDSpec: sqlgraph.NewFieldSpec(attachedfile.FieldID, field.TypeInt),
|
|
},
|
|
}
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
if nodes := _u.mutation.RemovedAttachedFilesIDs(); len(nodes) > 0 && !_u.mutation.AttachedFilesCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: true,
|
|
Table: process.AttachedFilesTable,
|
|
Columns: []string{process.AttachedFilesColumn},
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
IDSpec: sqlgraph.NewFieldSpec(attachedfile.FieldID, field.TypeInt),
|
|
},
|
|
}
|
|
for _, k := range nodes {
|
|
edge.Target.Nodes = append(edge.Target.Nodes, k)
|
|
}
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
if nodes := _u.mutation.AttachedFilesIDs(); len(nodes) > 0 {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: true,
|
|
Table: process.AttachedFilesTable,
|
|
Columns: []string{process.AttachedFilesColumn},
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
IDSpec: sqlgraph.NewFieldSpec(attachedfile.FieldID, field.TypeInt),
|
|
},
|
|
}
|
|
for _, k := range nodes {
|
|
edge.Target.Nodes = append(edge.Target.Nodes, k)
|
|
}
|
|
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
|
}
|
|
_node = &Process{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{process.Label}
|
|
} else if sqlgraph.IsConstraintError(err) {
|
|
err = &ConstraintError{msg: err.Error(), wrap: err}
|
|
}
|
|
return nil, err
|
|
}
|
|
_u.mutation.done = true
|
|
return _node, nil
|
|
}
|