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

Added lower bound functionality (#7) #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kotov-valery
Copy link
Collaborator

No description provided.

@@ -266,4 +266,42 @@ TEST_F(test_transaction, trivial_types_dup_iterate_by_key)
ASSERT_TRUE(result);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think there is a small bug in trivial_types_dup_iterate_by_key, iterate_by_key call should be used instead. I will look into that as a different PR.

@codecov-commenter
Copy link

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (a63841b) 93.04% compared to head (61e0b5b) 93.44%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #23      +/-   ##
==========================================
+ Coverage   93.04%   93.44%   +0.39%     
==========================================
  Files          13       15       +2     
  Lines         446      519      +73     
==========================================
+ Hits          415      485      +70     
- Misses         31       34       +3     
Files Coverage Δ
include/cpp_lmdb/iterators.hpp 96.00% <100.00%> (ø)
include/cpp_lmdb/transactions.hpp 94.87% <85.71%> (-2.01%) ⬇️
test/unit/test_transaction.cpp 88.97% <95.83%> (+1.59%) ⬆️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -38,6 +38,8 @@ class transaction {

using ro_view
= db_view<ro_iterator<key_trait, value_trait, LmdbApi>, LmdbApi>;
using ro_lo_view
= db_dup_view<ro_iterator<key_trait, value_trait, LmdbApi>, LmdbApi>;
Copy link
Owner

Choose a reason for hiding this comment

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

I think it makes sense to rename db_dup_view into something like db_view_with_key as it is now used not only in key duplicate scenarios


auto const& db_view = *result;
auto const it = db_view.begin();
EXPECT_NE(it, db_view.end());
Copy link
Owner

Choose a reason for hiding this comment

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

Please use ASSERT_NE before iterator will be dereferenced.

auto *cursor{reinterpret_cast<MDB_cursor *>(0x84)};

{
InSequence const seq;
Copy link
Owner

Choose a reason for hiding this comment

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

Would be great to have basic integration test as well.

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.

3 participants