Level / abstract-level

Abstract class for a lexicographically sorted key-value database.
MIT License
123 stars 8 forks source link

getMany with partial result? #39

Closed ronag closed 2 years ago

ronag commented 2 years ago

I believe currently the getMany API expects an all or nothing result. However, I think it might make sense to allow partial results based on e.g. a high water mark or deadline?

vweevers commented 2 years ago

The getMany() method has a straight-forward use case, precisely for when memory usage (etc) is not a concern. Otherwise, iterators should be used. Between iterators and getMany() there are gaps in functionality, but I'd prefer to close those gaps with (for example) a snapshot API like db.snapshot().get(). Rather than diluting getMany().

Your question is a bit vague. What particular gap are you trying to close?

ronag commented 2 years ago

I'll sort it with a custom method.