MCPcopy Create free account
hub / github.com/an0nfunc/ALHP / sqlSave

Method sqlSave

ent/dbpackage_update.go:483–631  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

481 _u.mutation.ClearSonames()
482 return _u
483}
484
485// SetBuildDuration sets the "build_duration" field.
486func (_u *DBPackageUpdate) SetBuildDuration(v int64) *DBPackageUpdate {
487 _u.mutation.ResetBuildDuration()
488 _u.mutation.SetBuildDuration(v)
489 return _u
490}
491
492// SetNillableBuildDuration sets the "build_duration" field if the given value is not nil.
493func (_u *DBPackageUpdate) SetNillableBuildDuration(v *int64) *DBPackageUpdate {
494 if v != nil {
495 _u.SetBuildDuration(*v)
496 }
497 return _u
498}
499
500// AddBuildDuration adds value to the "build_duration" field.
501func (_u *DBPackageUpdate) AddBuildDuration(v int64) *DBPackageUpdate {
502 _u.mutation.AddBuildDuration(v)
503 return _u
504}
505
506// ClearBuildDuration clears the value of the "build_duration" field.
507func (_u *DBPackageUpdate) ClearBuildDuration() *DBPackageUpdate {
508 _u.mutation.ClearBuildDuration()
509 return _u
510}
511
512// Mutation returns the DBPackageMutation object of the builder.
513func (_u *DBPackageUpdate) Mutation() *DBPackageMutation {
514 return _u.mutation
515}
516
517// Save executes the query and returns the number of nodes affected by the update operation.
518func (_u *DBPackageUpdate) Save(ctx context.Context) (int, error) {
519 return withHooks(ctx, _u.sqlSave, _u.mutation, _u.hooks)
520}
521
522// SaveX is like Save, but panics if an error occurs.
523func (_u *DBPackageUpdate) SaveX(ctx context.Context) int {
524 affected, err := _u.Save(ctx)
525 if err != nil {
526 panic(err)
527 }
528 return affected
529}
530
531// Exec executes the query.
532func (_u *DBPackageUpdate) Exec(ctx context.Context) error {
533 _, err := _u.Save(ctx)
534 return err
535}
536
537// ExecX is like Exec, but panics if an error occurs.
538func (_u *DBPackageUpdate) ExecX(ctx context.Context) {
539 if err := _u.Exec(ctx); err != nil {
540 panic(err)

Callers

nothing calls this directly

Calls 15

checkMethod · 0.95
PackagesMethod · 0.80
SetFieldMethod · 0.80
AppendedPackagesMethod · 0.80
AppendMethod · 0.80
PackagesClearedMethod · 0.80
ClearFieldMethod · 0.80
StatusMethod · 0.80
StatusClearedMethod · 0.80
SkipReasonMethod · 0.80
SkipReasonClearedMethod · 0.80
RepositoryMethod · 0.80

Tested by

no test coverage detected