-
Notifications
You must be signed in to change notification settings - Fork 20
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
khepri_adv, khepri_tx_adv: Always return khepri_adv:many_results()
#303
Conversation
89e9807
to
c17382b
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #303 +/- ##
==========================================
+ Coverage 89.66% 89.75% +0.08%
==========================================
Files 22 22
Lines 3251 3230 -21
==========================================
- Hits 2915 2899 -16
+ Misses 336 331 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor typo I see in the second commit: "inser"=>"insert", otherwise I think this looks good 👍
c17382b
to
f71656a
Compare
[Why] Functions such as `khepri_adv:get()` and `khepri_adv:put()` extracted the single node's properties from the query/command return value and returned only that. Therefore, the return value had a different form than other advanced functions' full node properties map. In a future patch, we want to add the nodes deleted by the "expiration" of `keep_while` conditions. They can be deleted after a delete or a put. If we want to achieve that, we need to make all functions return the same thing. [How] All functions that returned the single node props value are simplified to return the whole map, regardless of the number of tree nodes in the map.
[Why] The projection needs a tuple to insert it in ETS in the end. Therefore we can't use the `copy` method and store an atom. We need the projection function to create that tuple.
f71656a
to
efc491c
Compare
Thank you! It is fixed. |
Why
Functions such as
khepri_adv:get()
andkhepri_adv:put()
extracted the single node's properties from the query/command return value and returned only that.Therefore, the return value had a different form than other advanced functions' full node properties map.
In a future patch, we want to add the nodes deleted by the "expiration" of
keep_while
conditions. They can be deleted after a delete or a put. If we want to achieve that, we need to make all functions return the same thing.How
All functions that returned the single node props value are simplified to return the whole map, regardless of the number of tree nodes in the map.