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

Signature Of KeyValue::Batch::Get-Keys #25

Closed
adamgfraser opened this issue Sep 26, 2023 · 1 comment · Fixed by #30
Closed

Signature Of KeyValue::Batch::Get-Keys #25

adamgfraser opened this issue Sep 26, 2023 · 1 comment · Fixed by #30

Comments

@adamgfraser
Copy link

The current signature is:

get-keys: func(bucket: bucket) -> keys

Unlike almost all the other functions in the interface, this one returns a raw value versus a result. This seems strange since getting the keys could fail with a variety of database related errors (e.g. can't connect to the database).

I would have thought the signature would be:

get-keys: func(bucket: bucket) -> result<keys, error>
@Mossaka
Copy link
Collaborator

Mossaka commented Oct 16, 2023

Thanks for raising this issue! Yes, returning a raw value does seem strange to me. I think the new signature looks much better.

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 a pull request may close this issue.

2 participants