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 fold_keys and fold_kvs (key-value pairs) operations #2

Open
tatsuya6502 opened this issue Jun 9, 2015 · 0 comments
Open

Add fold_keys and fold_kvs (key-value pairs) operations #2

tatsuya6502 opened this issue Jun 9, 2015 · 0 comments
Assignees

Comments

@tatsuya6502
Copy link
Member

Support common operations to iterate through keys or key-value pairs.

%% Start, inclusive
%% End, inclusive
-spec fold_keys(db(), fun((key(), AccIn::term()) -> AccOut::term()),
                Acc0::term(),
                StartKey::key() | undefined,
                StopKey::key() | undefined,
                NumItems::non_neg_integer()) ->
                       {ok, Acc1::term(), IsTruncated::boolean()}
                           | {error, io_error}.

%% Start, inclusive
%% End, inclusive
-spec fold_kvs(db(), fun(({key(), value()}, AccIn::term()) -> AccOut::term()),
               Acc0::term(),
               StartKey::key() | undefined,
               StopKey::key() | undefined,
               NumItems::non_neg_integer()) ->
                      {ok, Acc1::term(), IsTruncated::boolean()}
                          | {error, io_error}.
@tatsuya6502 tatsuya6502 self-assigned this Jun 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant