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
Example implementation of enumerate #1386
base: master
Are you sure you want to change the base?
Conversation
ee5bbba
to
90770ed
Compare
90770ed
to
fd4369f
Compare
|
||
class Proxy { | ||
public: | ||
using difference_type = ssize_t; |
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.
What is difference_type
supposed to represent? Is it difference between Enumerator::idx_? If so it seems a bit dangerous as idx_ is of unsigned type.
#include <arcticdb/log/log.hpp> | ||
|
||
TEST(Enumerate, Vector) { | ||
std::vector<int> vec = {1, 2, 3, 4}; |
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.
nit: static constexpr std::array = {1,2,3,4}
@@ -0,0 +1,119 @@ | |||
#pragma once |
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.
BSL heading
Introduces a new type LoadStrategy which has the load_type, the include_deleted boolean and the version/time we need to search for. With this commit we mostly preserve existing behavior with a few exceptions: - The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy. - Abstract away the batch version map merging of LoadStrategies and fix a small bug there. - Fixes #1386 by passing include_deleted=false when looking for as_of time or version
Introduces a new type LoadStrategy which has the load_type, the include_deleted boolean and the version/time we need to search for. With this commit we mostly preserve existing behavior with a few exceptions: - The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy. - Abstract away the batch version map merging of LoadStrategies and fix a small bug there. - Fixes #1386 by passing include_deleted=false when looking for as_of time or version Also adds an elaborate FollowingVersionChain cpp test
Introduces a new type LoadStrategy which has the load_type, the include_deleted boolean and the version/time we need to search for. With this commit we mostly preserve existing behavior with a few exceptions: - The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy. - Abstract away the batch version map merging of LoadStrategies and fix a small bug there. - Fixes #1386 by passing include_deleted=false when looking for as_of time or version Also adds an elaborate FollowingVersionChain cpp test
Introduces a new type LoadStrategy which has the load_type, the include_deleted boolean and the version/time we need to search for. With this commit we mostly preserve existing behavior with a few exceptions: - The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy. - Abstract away the batch version map merging of LoadStrategies and fix a small bug there. - Fixes #1386 by passing include_deleted=false when looking for as_of time or version Also adds an elaborate FollowingVersionChain cpp test
Introduces a new type LoadStrategy which has the load_type, the include_deleted boolean and the version/time we need to search for. With this commit we mostly preserve existing behavior with a few exceptions: - The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy. - Abstract away the batch version map merging of LoadStrategies and fix a small bug there. - Fixes #1386 by passing include_deleted=false when looking for as_of time or version Also adds an elaborate FollowingVersionChain cpp test
Introduces a new type LoadStrategy which has the load_type, the include_deleted boolean and the version/time we need to search for. With this commit we mostly preserve existing behavior with a few exceptions: - The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy. - Abstract away the batch version map merging of LoadStrategies and fix a small bug there. - Fixes #1386 by passing include_deleted=false when looking for as_of time or version Also adds an elaborate FollowingVersionChain cpp test
Introduces a new type LoadStrategy which has the load_type, the to_load enum, which indicates whether to load ANY or only UNDELETED versions and the version/time we need to search for. With this commit we mostly preserve existing behavior with a few exceptions: - The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy. - Abstract away the batch version map merging of LoadStrategies and fix a small bug there. - Fixes #1386 by passing include_deleted=false when looking for as_of time or version Also adds an elaborate FollowingVersionChain cpp test
Introduces a new type LoadStrategy which has the load_type, the to_load enum, which indicates whether to load ANY or only UNDELETED versions and the version/time we need to search for. With this commit we mostly preserve existing behavior with a few exceptions: - The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy. - Abstract away the batch version map merging of LoadStrategies and fix a small bug there. - Fixes #1386 by passing include_deleted=false when looking for as_of time or version Also adds an elaborate FollowingVersionChain and FollowingVersionChainWithCaching cpp tests
Introduces a new type LoadStrategy which has the load_type, the to_load enum, which indicates whether to load ANY or only UNDELETED versions and the version/time we need to search for. With this commit we mostly preserve existing behavior with a few exceptions: - The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy. - Abstract away the batch version map merging of LoadStrategies and fix a small bug there. - Fixes #1386 by passing include_deleted=false when looking for as_of time or version Also adds an elaborate FollowingVersionChain and FollowingVersionChainWithCaching cpp tests
Introduces a new type LoadStrategy which has the load_type, the to_load enum, which indicates whether to load ANY or only UNDELETED versions and the version/time we need to search for. With this commit we mostly preserve existing behavior with a few exceptions: - The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy. - Abstract away the batch version map merging of LoadStrategies and fix a small bug there. - Fixes #1386 by passing include_deleted=false when looking for as_of time or version Also adds an elaborate FollowingVersionChain and FollowingVersionChainWithCaching cpp tests
Introduces a new type LoadStrategy which has the load_type, the to_load enum, which indicates whether to load ANY or only UNDELETED versions and the version/time we need to search for. With this commit we mostly preserve existing behavior with a few exceptions: - The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy. - Abstract away the batch version map merging of LoadStrategies and fix a small bug there. - Fixes #1386 by passing include_deleted=false when looking for as_of time or version Also adds an elaborate FollowingVersionChain and FollowingVersionChainWithCaching cpp tests
Introduces a new type LoadStrategy which has the load_type, the to_load enum, which indicates whether to load ANY or only UNDELETED versions and the version/time we need to search for. With this commit we mostly preserve existing behavior with a few exceptions: - The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy. - Abstract away the batch version map merging of LoadStrategies and fix a small bug there. - Fixes #1386 by passing include_deleted=false when looking for as_of time or version Also adds an elaborate FollowingVersionChain and FollowingVersionChainWithCaching cpp tests
Introduces a new type LoadStrategy which has the load_type, the to_load enum, which indicates whether to load ANY or only UNDELETED versions and the version/time we need to search for. With this commit we mostly preserve existing behavior with a few exceptions: - The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy. - Abstract away the batch version map merging of LoadStrategies and fix a small bug there. - Fixes #1386 by passing include_deleted=false when looking for as_of time or version Also adds an elaborate FollowingVersionChain and FollowingVersionChainWithCaching cpp tests
Introduces a new type LoadStrategy which has the load_type, the to_load enum, which indicates whether to load ANY or only UNDELETED versions and the version/time we need to search for. With this commit we mostly preserve existing behavior with a few exceptions: - The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy. - Abstract away the batch version map merging of LoadStrategies and fix a small bug there. - Fixes #1386 by passing include_deleted=false when looking for as_of time or version Also adds an elaborate FollowingVersionChain and FollowingVersionChainWithCaching cpp tests
Example of internal implementation of enumerate