Skip to content
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

Add support for soft delete related functions #65

Merged
merged 28 commits into from
Sep 28, 2023

Conversation

YanhaoLi07
Copy link
Contributor

@YanhaoLi07 YanhaoLi07 commented Sep 20, 2023

  • For DataStore and ProtoStore, add functions for finding records including soft deleted
  • For DataStore and ProtoStore, add functions for finding all records including soft deleted
  • Return metaData in ProtoStore's soft delete function

Fixes: #64

1. find records including soft deleted
2. find all records including soft deleted
3. return metaData in protoStore's soft delete function
@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2023

Codecov Report

Merging #65 (c01819d) into main (36f3bcc) will increase coverage by 0.56%.
The diff coverage is 62.88%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #65      +/-   ##
==========================================
+ Coverage   70.65%   71.21%   +0.56%     
==========================================
  Files          12       12              
  Lines        1520     1560      +40     
==========================================
+ Hits         1074     1111      +37     
  Misses        352      352              
- Partials       94       97       +3     
Flag Coverage Δ
unit-tests 71.21% <62.88%> (+0.56%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
pkg/protostore/protostore.go 68.36% <77.41%> (+0.35%) ⬆️
pkg/datastore/database.go 61.14% <56.06%> (+2.20%) ⬆️

Copy link
Contributor

@krishnamiriyala krishnamiriyala left a comment

Choose a reason for hiding this comment

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

nits: please add unit-tests, you can call softdelete and findwithSoftDeletes for one of the existing tests to cover all the new codepaths.

pkg/datastore/database.go Outdated Show resolved Hide resolved
pkg/datastore/datastore.go Show resolved Hide resolved
pkg/datastore/database.go Show resolved Hide resolved
pkg/datastore/database.go Outdated Show resolved Hide resolved
pkg/protostore/protostore.go Show resolved Hide resolved
pkg/protostore/protostore.go Outdated Show resolved Hide resolved
Copy link
Contributor

@krishnamiriyala krishnamiriyala left a comment

Choose a reason for hiding this comment

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

overall lgtm. lmk once you add unit-tests

Copy link
Contributor

@krishnamiriyala krishnamiriyala left a comment

Choose a reason for hiding this comment

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

Please run make lint_fix doc, other comments can be in follow up

@krishnamiriyala krishnamiriyala changed the title add support for soft delete related functions Add support for soft delete related functions Sep 28, 2023
pkg/datastore/database.go Show resolved Hide resolved
@krishnamiriyala krishnamiriyala merged commit af5b059 into main Sep 28, 2023
6 checks passed
@krishnamiriyala krishnamiriyala deleted the support-soft-delete branch September 29, 2023 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add support for soft delete related functions
4 participants