@@ -463,7 +463,7 @@ func (*AssetRepository) validateAsset(ast asset.Asset) error {
463
463
return nil
464
464
}
465
465
466
- // DeleteByID removes asset using its ID
466
+ // DeleteByID hard delete asset using its ID
467
467
func (r * AssetRepository ) DeleteByID (ctx context.Context , id string ) (urn string , err error ) {
468
468
err = r .client .RunWithinTx (ctx , func (tx * sqlx.Tx ) error {
469
469
fetchedAsset , err := r .GetByIDWithTx (ctx , tx , id )
@@ -486,6 +486,7 @@ func (r *AssetRepository) DeleteByID(ctx context.Context, id string) (urn string
486
486
return urn , nil
487
487
}
488
488
489
+ // DeleteByURN hard delete asset using its URN
489
490
func (r * AssetRepository ) DeleteByURN (ctx context.Context , urn string ) error {
490
491
err := r .client .RunWithinTx (ctx , func (tx * sqlx.Tx ) (err error ) {
491
492
err = r .deleteWithPredicate (ctx , tx , sq.Eq {"urn" : urn })
@@ -502,7 +503,6 @@ func (r *AssetRepository) DeleteByURN(ctx context.Context, urn string) error {
502
503
return nil
503
504
}
504
505
505
- // SoftDeleteByID soft delete the asset using its ID
506
506
func (r * AssetRepository ) SoftDeleteByID (ctx context.Context , id string , softDeleteAsset asset.SoftDeleteAsset ) (urn string , err error ) {
507
507
err = r .client .RunWithinTx (ctx , func (tx * sqlx.Tx ) error {
508
508
fetchedAsset , err := r .GetByIDWithTx (ctx , tx , id )
@@ -531,7 +531,6 @@ func (r *AssetRepository) SoftDeleteByID(ctx context.Context, id string, softDel
531
531
return urn , nil
532
532
}
533
533
534
- // SoftDeleteByURN soft delete the asset using its URN
535
534
func (r * AssetRepository ) SoftDeleteByURN (ctx context.Context , urn string , softDeleteAsset asset.SoftDeleteAsset ) error {
536
535
err := r .client .RunWithinTx (ctx , func (tx * sqlx.Tx ) (err error ) {
537
536
fetchedAsset , err := r .GetByURNWithTx (ctx , tx , urn )
0 commit comments