https://kotlinlang.org logo
#flow
Title
# flow
s

Sam Stone

04/15/2022, 2:45 AM
Why do the docs discourage the use of
flatMapMerge{}
? Android SQLite has a limit of 999 params per query, so I
window
my params by 999, call
asFlow
, then
flatMapMerge{ids->db.flowOfEntities(ids)}
. Is that wrong?
w

wasyl

04/15/2022, 6:36 AM
I’d say it’s because most of the time there are simpler operators that can be used to achieve the desired behavior, and
flatMapMerge
has very specific use cases. I guess for your use case it makes sense, although it is a pretty specific use case (a single flow that will emit various items)
4 Views