Skip to content

feat: soft delete by ID #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

feat: soft delete by ID #91

wants to merge 7 commits into from

Conversation

luthfifahlevi
Copy link

No description provided.

@luthfifahlevi luthfifahlevi self-assigned this May 21, 2025
@luthfifahlevi luthfifahlevi changed the title feat: soft-deletion feat: soft-deletion by ID May 21, 2025
@coveralls
Copy link

coveralls commented May 27, 2025

Pull Request Test Coverage Report for Build 15287397780

Details

  • 304 of 362 (83.98%) changed or added relevant lines in 9 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.06%) to 83.846%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/workermanager/discovery_worker.go 30 34 88.24%
internal/store/postgres/asset_repository.go 111 136 81.62%
internal/store/elasticsearch/discovery_repository.go 111 140 79.29%
Files with Coverage Reduction New Missed Lines %
internal/store/elasticsearch/discovery_repository.go 1 62.41%
internal/store/postgres/asset_repository.go 2 77.28%
Totals Coverage Status
Change from base Build 15073322245: 0.06%
Covered Lines: 7225
Relevant Lines: 8617

💛 - Coveralls

@luthfifahlevi luthfifahlevi changed the title feat: soft-deletion by ID feat: soft delete by ID May 29, 2025
@@ -22,8 +22,10 @@ type Repository interface {
GetTypes(ctx context.Context, flt Filter) (map[Type]int, error)
Upsert(ctx context.Context, ast *Asset) (string, error)
UpsertPatch(ctx context.Context, ast *Asset, patchData map[string]interface{}) (string, error)
DeleteByID(ctx context.Context, id string) error
DeleteByID(ctx context.Context, id string) (string, error)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead introduce new method SoftDelete*, let's keep using the existing one, will override the behavior to soft delete, hard deletion will come later on

Copy link
Author

@luthfifahlevi luthfifahlevi Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan to create new MR to delete Delete* method, to avoid confusion on reviewing too.
And to easily revert from that MR if turns out that any Delete* needed

any concern about that mas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants