Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [nosql-dev] Support for iterables #200

It’s been on my mental back-burner to try out some lazy-loading options in my driver. I’ve considered if it’d work to make a List implementation that lazy-loads internally, since that’d keep some handy methods that Iterable doesn’t have. On the other hand, maybe Stream would be most idiomatic now, and could have efficient count, etc. operations while also having a stronger implication of lazy-loading.

-Jesse


On Fri, Aug 16, 2019 at 10:35 PM Otávio Gonçalves de Santana <otaviopolianasantana@xxxxxxxxx> wrote:
DocumentCollectionManager::search produces a list.
Do we assume that result will always comfortably fit in memory?
In NoSQL world, it often doesn't and this prevents the whole (very convenient) API to be used at all.

We need a separate search implementation that returns an iterable, or a stream, or an observable

This would be easy to create from existing search implementation. Looking at drivers, most of the time it does iterable -> stream(iterable).collect(toList)

Suggestions?

--
Otávio Gonçalves de Santana


--
Otávio Gonçalves de Santana

Back to the top