You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.
If the previous record exists, returns pmem::kv::status::OK, otherwise pmem::kv::status::NOT_FOUND is returned and the iterator position is undefined.
So if we are on the first element we will be on the undefined position after calling prev(). With is_prev() method, we could avoid this.
Description
To solve this problem we can simply add is_prev() method to iterators that support prev() method.
But probably better option will be to change documentation to:
If the previous record exists, returns pmem::kv::status::OK, otherwise pmem::kv::status::NOT_FOUND is returned and the iterator position doesn't change.
Because in the current implementation position really doesn't change. It is only undefined by documentation.
API Changes
add is_prev() method to iterators or change prev() documentation
The text was updated successfully, but these errors were encountered:
FEAT: add is_prev() method in Iterators API
Rationale
For now we have in documentation of prev():
So if we are on the first element we will be on the undefined position after calling prev(). With is_prev() method, we could avoid this.
Description
To solve this problem we can simply add is_prev() method to iterators that support prev() method.
But probably better option will be to change documentation to:
Because in the current implementation position really doesn't change. It is only undefined by documentation.
API Changes
add is_prev() method to iterators or change prev() documentation
The text was updated successfully, but these errors were encountered: