mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-11-24 21:29:00 +08:00
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
512 lines
16 KiB
Go
512 lines
16 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package db
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
"fmt"
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
|
"entgo.io/ent/schema/field"
|
|
"github.com/chaitin/MonkeyCode/backend/db/agentskill"
|
|
"github.com/chaitin/MonkeyCode/backend/db/agentskillversion"
|
|
"github.com/chaitin/MonkeyCode/backend/db/predicate"
|
|
"github.com/chaitin/MonkeyCode/backend/ent/types"
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// AgentSkillVersionUpdate is the builder for updating AgentSkillVersion entities.
|
|
type AgentSkillVersionUpdate struct {
|
|
config
|
|
hooks []Hook
|
|
mutation *AgentSkillVersionMutation
|
|
modifiers []func(*sql.UpdateBuilder)
|
|
}
|
|
|
|
// Where appends a list predicates to the AgentSkillVersionUpdate builder.
|
|
func (_u *AgentSkillVersionUpdate) Where(ps ...predicate.AgentSkillVersion) *AgentSkillVersionUpdate {
|
|
_u.mutation.Where(ps...)
|
|
return _u
|
|
}
|
|
|
|
// SetResourceID sets the "resource_id" field.
|
|
func (_u *AgentSkillVersionUpdate) SetResourceID(v uuid.UUID) *AgentSkillVersionUpdate {
|
|
_u.mutation.SetResourceID(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableResourceID sets the "resource_id" field if the given value is not nil.
|
|
func (_u *AgentSkillVersionUpdate) SetNillableResourceID(v *uuid.UUID) *AgentSkillVersionUpdate {
|
|
if v != nil {
|
|
_u.SetResourceID(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetVersion sets the "version" field.
|
|
func (_u *AgentSkillVersionUpdate) SetVersion(v string) *AgentSkillVersionUpdate {
|
|
_u.mutation.SetVersion(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableVersion sets the "version" field if the given value is not nil.
|
|
func (_u *AgentSkillVersionUpdate) SetNillableVersion(v *string) *AgentSkillVersionUpdate {
|
|
if v != nil {
|
|
_u.SetVersion(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetS3Key sets the "s3_key" field.
|
|
func (_u *AgentSkillVersionUpdate) SetS3Key(v string) *AgentSkillVersionUpdate {
|
|
_u.mutation.SetS3Key(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableS3Key sets the "s3_key" field if the given value is not nil.
|
|
func (_u *AgentSkillVersionUpdate) SetNillableS3Key(v *string) *AgentSkillVersionUpdate {
|
|
if v != nil {
|
|
_u.SetS3Key(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetParsedMeta sets the "parsed_meta" field.
|
|
func (_u *AgentSkillVersionUpdate) SetParsedMeta(v types.SkillParsedMeta) *AgentSkillVersionUpdate {
|
|
_u.mutation.SetParsedMeta(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableParsedMeta sets the "parsed_meta" field if the given value is not nil.
|
|
func (_u *AgentSkillVersionUpdate) SetNillableParsedMeta(v *types.SkillParsedMeta) *AgentSkillVersionUpdate {
|
|
if v != nil {
|
|
_u.SetParsedMeta(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// ClearParsedMeta clears the value of the "parsed_meta" field.
|
|
func (_u *AgentSkillVersionUpdate) ClearParsedMeta() *AgentSkillVersionUpdate {
|
|
_u.mutation.ClearParsedMeta()
|
|
return _u
|
|
}
|
|
|
|
// SetCreatedAt sets the "created_at" field.
|
|
func (_u *AgentSkillVersionUpdate) SetCreatedAt(v time.Time) *AgentSkillVersionUpdate {
|
|
_u.mutation.SetCreatedAt(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
|
|
func (_u *AgentSkillVersionUpdate) SetNillableCreatedAt(v *time.Time) *AgentSkillVersionUpdate {
|
|
if v != nil {
|
|
_u.SetCreatedAt(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetSkillID sets the "skill" edge to the AgentSkill entity by ID.
|
|
func (_u *AgentSkillVersionUpdate) SetSkillID(id uuid.UUID) *AgentSkillVersionUpdate {
|
|
_u.mutation.SetSkillID(id)
|
|
return _u
|
|
}
|
|
|
|
// SetSkill sets the "skill" edge to the AgentSkill entity.
|
|
func (_u *AgentSkillVersionUpdate) SetSkill(v *AgentSkill) *AgentSkillVersionUpdate {
|
|
return _u.SetSkillID(v.ID)
|
|
}
|
|
|
|
// Mutation returns the AgentSkillVersionMutation object of the builder.
|
|
func (_u *AgentSkillVersionUpdate) Mutation() *AgentSkillVersionMutation {
|
|
return _u.mutation
|
|
}
|
|
|
|
// ClearSkill clears the "skill" edge to the AgentSkill entity.
|
|
func (_u *AgentSkillVersionUpdate) ClearSkill() *AgentSkillVersionUpdate {
|
|
_u.mutation.ClearSkill()
|
|
return _u
|
|
}
|
|
|
|
// Save executes the query and returns the number of nodes affected by the update operation.
|
|
func (_u *AgentSkillVersionUpdate) 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 *AgentSkillVersionUpdate) SaveX(ctx context.Context) int {
|
|
affected, err := _u.Save(ctx)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return affected
|
|
}
|
|
|
|
// Exec executes the query.
|
|
func (_u *AgentSkillVersionUpdate) Exec(ctx context.Context) error {
|
|
_, err := _u.Save(ctx)
|
|
return err
|
|
}
|
|
|
|
// ExecX is like Exec, but panics if an error occurs.
|
|
func (_u *AgentSkillVersionUpdate) 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 *AgentSkillVersionUpdate) check() error {
|
|
if v, ok := _u.mutation.Version(); ok {
|
|
if err := agentskillversion.VersionValidator(v); err != nil {
|
|
return &ValidationError{Name: "version", err: fmt.Errorf(`db: validator failed for field "AgentSkillVersion.version": %w`, err)}
|
|
}
|
|
}
|
|
if v, ok := _u.mutation.S3Key(); ok {
|
|
if err := agentskillversion.S3KeyValidator(v); err != nil {
|
|
return &ValidationError{Name: "s3_key", err: fmt.Errorf(`db: validator failed for field "AgentSkillVersion.s3_key": %w`, err)}
|
|
}
|
|
}
|
|
if _u.mutation.SkillCleared() && len(_u.mutation.SkillIDs()) > 0 {
|
|
return errors.New(`db: clearing a required unique edge "AgentSkillVersion.skill"`)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
|
|
func (_u *AgentSkillVersionUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AgentSkillVersionUpdate {
|
|
_u.modifiers = append(_u.modifiers, modifiers...)
|
|
return _u
|
|
}
|
|
|
|
func (_u *AgentSkillVersionUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
|
if err := _u.check(); err != nil {
|
|
return _node, err
|
|
}
|
|
_spec := sqlgraph.NewUpdateSpec(agentskillversion.Table, agentskillversion.Columns, sqlgraph.NewFieldSpec(agentskillversion.FieldID, field.TypeUUID))
|
|
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.Version(); ok {
|
|
_spec.SetField(agentskillversion.FieldVersion, field.TypeString, value)
|
|
}
|
|
if value, ok := _u.mutation.S3Key(); ok {
|
|
_spec.SetField(agentskillversion.FieldS3Key, field.TypeString, value)
|
|
}
|
|
if value, ok := _u.mutation.ParsedMeta(); ok {
|
|
_spec.SetField(agentskillversion.FieldParsedMeta, field.TypeJSON, value)
|
|
}
|
|
if _u.mutation.ParsedMetaCleared() {
|
|
_spec.ClearField(agentskillversion.FieldParsedMeta, field.TypeJSON)
|
|
}
|
|
if value, ok := _u.mutation.CreatedAt(); ok {
|
|
_spec.SetField(agentskillversion.FieldCreatedAt, field.TypeTime, value)
|
|
}
|
|
if _u.mutation.SkillCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.M2O,
|
|
Inverse: true,
|
|
Table: agentskillversion.SkillTable,
|
|
Columns: []string{agentskillversion.SkillColumn},
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
IDSpec: sqlgraph.NewFieldSpec(agentskill.FieldID, field.TypeUUID),
|
|
},
|
|
}
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
if nodes := _u.mutation.SkillIDs(); len(nodes) > 0 {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.M2O,
|
|
Inverse: true,
|
|
Table: agentskillversion.SkillTable,
|
|
Columns: []string{agentskillversion.SkillColumn},
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
IDSpec: sqlgraph.NewFieldSpec(agentskill.FieldID, field.TypeUUID),
|
|
},
|
|
}
|
|
for _, k := range nodes {
|
|
edge.Target.Nodes = append(edge.Target.Nodes, k)
|
|
}
|
|
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
|
}
|
|
_spec.AddModifiers(_u.modifiers...)
|
|
if _node, err = sqlgraph.UpdateNodes(ctx, _u.driver, _spec); err != nil {
|
|
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
|
err = &NotFoundError{agentskillversion.Label}
|
|
} else if sqlgraph.IsConstraintError(err) {
|
|
err = &ConstraintError{msg: err.Error(), wrap: err}
|
|
}
|
|
return 0, err
|
|
}
|
|
_u.mutation.done = true
|
|
return _node, nil
|
|
}
|
|
|
|
// AgentSkillVersionUpdateOne is the builder for updating a single AgentSkillVersion entity.
|
|
type AgentSkillVersionUpdateOne struct {
|
|
config
|
|
fields []string
|
|
hooks []Hook
|
|
mutation *AgentSkillVersionMutation
|
|
modifiers []func(*sql.UpdateBuilder)
|
|
}
|
|
|
|
// SetResourceID sets the "resource_id" field.
|
|
func (_u *AgentSkillVersionUpdateOne) SetResourceID(v uuid.UUID) *AgentSkillVersionUpdateOne {
|
|
_u.mutation.SetResourceID(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableResourceID sets the "resource_id" field if the given value is not nil.
|
|
func (_u *AgentSkillVersionUpdateOne) SetNillableResourceID(v *uuid.UUID) *AgentSkillVersionUpdateOne {
|
|
if v != nil {
|
|
_u.SetResourceID(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetVersion sets the "version" field.
|
|
func (_u *AgentSkillVersionUpdateOne) SetVersion(v string) *AgentSkillVersionUpdateOne {
|
|
_u.mutation.SetVersion(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableVersion sets the "version" field if the given value is not nil.
|
|
func (_u *AgentSkillVersionUpdateOne) SetNillableVersion(v *string) *AgentSkillVersionUpdateOne {
|
|
if v != nil {
|
|
_u.SetVersion(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetS3Key sets the "s3_key" field.
|
|
func (_u *AgentSkillVersionUpdateOne) SetS3Key(v string) *AgentSkillVersionUpdateOne {
|
|
_u.mutation.SetS3Key(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableS3Key sets the "s3_key" field if the given value is not nil.
|
|
func (_u *AgentSkillVersionUpdateOne) SetNillableS3Key(v *string) *AgentSkillVersionUpdateOne {
|
|
if v != nil {
|
|
_u.SetS3Key(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetParsedMeta sets the "parsed_meta" field.
|
|
func (_u *AgentSkillVersionUpdateOne) SetParsedMeta(v types.SkillParsedMeta) *AgentSkillVersionUpdateOne {
|
|
_u.mutation.SetParsedMeta(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableParsedMeta sets the "parsed_meta" field if the given value is not nil.
|
|
func (_u *AgentSkillVersionUpdateOne) SetNillableParsedMeta(v *types.SkillParsedMeta) *AgentSkillVersionUpdateOne {
|
|
if v != nil {
|
|
_u.SetParsedMeta(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// ClearParsedMeta clears the value of the "parsed_meta" field.
|
|
func (_u *AgentSkillVersionUpdateOne) ClearParsedMeta() *AgentSkillVersionUpdateOne {
|
|
_u.mutation.ClearParsedMeta()
|
|
return _u
|
|
}
|
|
|
|
// SetCreatedAt sets the "created_at" field.
|
|
func (_u *AgentSkillVersionUpdateOne) SetCreatedAt(v time.Time) *AgentSkillVersionUpdateOne {
|
|
_u.mutation.SetCreatedAt(v)
|
|
return _u
|
|
}
|
|
|
|
// SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
|
|
func (_u *AgentSkillVersionUpdateOne) SetNillableCreatedAt(v *time.Time) *AgentSkillVersionUpdateOne {
|
|
if v != nil {
|
|
_u.SetCreatedAt(*v)
|
|
}
|
|
return _u
|
|
}
|
|
|
|
// SetSkillID sets the "skill" edge to the AgentSkill entity by ID.
|
|
func (_u *AgentSkillVersionUpdateOne) SetSkillID(id uuid.UUID) *AgentSkillVersionUpdateOne {
|
|
_u.mutation.SetSkillID(id)
|
|
return _u
|
|
}
|
|
|
|
// SetSkill sets the "skill" edge to the AgentSkill entity.
|
|
func (_u *AgentSkillVersionUpdateOne) SetSkill(v *AgentSkill) *AgentSkillVersionUpdateOne {
|
|
return _u.SetSkillID(v.ID)
|
|
}
|
|
|
|
// Mutation returns the AgentSkillVersionMutation object of the builder.
|
|
func (_u *AgentSkillVersionUpdateOne) Mutation() *AgentSkillVersionMutation {
|
|
return _u.mutation
|
|
}
|
|
|
|
// ClearSkill clears the "skill" edge to the AgentSkill entity.
|
|
func (_u *AgentSkillVersionUpdateOne) ClearSkill() *AgentSkillVersionUpdateOne {
|
|
_u.mutation.ClearSkill()
|
|
return _u
|
|
}
|
|
|
|
// Where appends a list predicates to the AgentSkillVersionUpdate builder.
|
|
func (_u *AgentSkillVersionUpdateOne) Where(ps ...predicate.AgentSkillVersion) *AgentSkillVersionUpdateOne {
|
|
_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 *AgentSkillVersionUpdateOne) Select(field string, fields ...string) *AgentSkillVersionUpdateOne {
|
|
_u.fields = append([]string{field}, fields...)
|
|
return _u
|
|
}
|
|
|
|
// Save executes the query and returns the updated AgentSkillVersion entity.
|
|
func (_u *AgentSkillVersionUpdateOne) Save(ctx context.Context) (*AgentSkillVersion, error) {
|
|
return withHooks(ctx, _u.sqlSave, _u.mutation, _u.hooks)
|
|
}
|
|
|
|
// SaveX is like Save, but panics if an error occurs.
|
|
func (_u *AgentSkillVersionUpdateOne) SaveX(ctx context.Context) *AgentSkillVersion {
|
|
node, err := _u.Save(ctx)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return node
|
|
}
|
|
|
|
// Exec executes the query on the entity.
|
|
func (_u *AgentSkillVersionUpdateOne) Exec(ctx context.Context) error {
|
|
_, err := _u.Save(ctx)
|
|
return err
|
|
}
|
|
|
|
// ExecX is like Exec, but panics if an error occurs.
|
|
func (_u *AgentSkillVersionUpdateOne) 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 *AgentSkillVersionUpdateOne) check() error {
|
|
if v, ok := _u.mutation.Version(); ok {
|
|
if err := agentskillversion.VersionValidator(v); err != nil {
|
|
return &ValidationError{Name: "version", err: fmt.Errorf(`db: validator failed for field "AgentSkillVersion.version": %w`, err)}
|
|
}
|
|
}
|
|
if v, ok := _u.mutation.S3Key(); ok {
|
|
if err := agentskillversion.S3KeyValidator(v); err != nil {
|
|
return &ValidationError{Name: "s3_key", err: fmt.Errorf(`db: validator failed for field "AgentSkillVersion.s3_key": %w`, err)}
|
|
}
|
|
}
|
|
if _u.mutation.SkillCleared() && len(_u.mutation.SkillIDs()) > 0 {
|
|
return errors.New(`db: clearing a required unique edge "AgentSkillVersion.skill"`)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
|
|
func (_u *AgentSkillVersionUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AgentSkillVersionUpdateOne {
|
|
_u.modifiers = append(_u.modifiers, modifiers...)
|
|
return _u
|
|
}
|
|
|
|
func (_u *AgentSkillVersionUpdateOne) sqlSave(ctx context.Context) (_node *AgentSkillVersion, err error) {
|
|
if err := _u.check(); err != nil {
|
|
return _node, err
|
|
}
|
|
_spec := sqlgraph.NewUpdateSpec(agentskillversion.Table, agentskillversion.Columns, sqlgraph.NewFieldSpec(agentskillversion.FieldID, field.TypeUUID))
|
|
id, ok := _u.mutation.ID()
|
|
if !ok {
|
|
return nil, &ValidationError{Name: "id", err: errors.New(`db: missing "AgentSkillVersion.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, agentskillversion.FieldID)
|
|
for _, f := range fields {
|
|
if !agentskillversion.ValidColumn(f) {
|
|
return nil, &ValidationError{Name: f, err: fmt.Errorf("db: invalid field %q for query", f)}
|
|
}
|
|
if f != agentskillversion.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.Version(); ok {
|
|
_spec.SetField(agentskillversion.FieldVersion, field.TypeString, value)
|
|
}
|
|
if value, ok := _u.mutation.S3Key(); ok {
|
|
_spec.SetField(agentskillversion.FieldS3Key, field.TypeString, value)
|
|
}
|
|
if value, ok := _u.mutation.ParsedMeta(); ok {
|
|
_spec.SetField(agentskillversion.FieldParsedMeta, field.TypeJSON, value)
|
|
}
|
|
if _u.mutation.ParsedMetaCleared() {
|
|
_spec.ClearField(agentskillversion.FieldParsedMeta, field.TypeJSON)
|
|
}
|
|
if value, ok := _u.mutation.CreatedAt(); ok {
|
|
_spec.SetField(agentskillversion.FieldCreatedAt, field.TypeTime, value)
|
|
}
|
|
if _u.mutation.SkillCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.M2O,
|
|
Inverse: true,
|
|
Table: agentskillversion.SkillTable,
|
|
Columns: []string{agentskillversion.SkillColumn},
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
IDSpec: sqlgraph.NewFieldSpec(agentskill.FieldID, field.TypeUUID),
|
|
},
|
|
}
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
if nodes := _u.mutation.SkillIDs(); len(nodes) > 0 {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.M2O,
|
|
Inverse: true,
|
|
Table: agentskillversion.SkillTable,
|
|
Columns: []string{agentskillversion.SkillColumn},
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
IDSpec: sqlgraph.NewFieldSpec(agentskill.FieldID, field.TypeUUID),
|
|
},
|
|
}
|
|
for _, k := range nodes {
|
|
edge.Target.Nodes = append(edge.Target.Nodes, k)
|
|
}
|
|
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
|
}
|
|
_spec.AddModifiers(_u.modifiers...)
|
|
_node = &AgentSkillVersion{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{agentskillversion.Label}
|
|
} else if sqlgraph.IsConstraintError(err) {
|
|
err = &ConstraintError{msg: err.Error(), wrap: err}
|
|
}
|
|
return nil, err
|
|
}
|
|
_u.mutation.done = true
|
|
return _node, nil
|
|
}
|