ursus
10/22/2021, 6:59 PMdata1
, data2
, data3
types. They're not related. For reasons I need to normalize this into 3 tables, and cannot be kept as json together.
But now, how should I query all three reactively together, in a way that the listener emits only once, same way join changes do?
I could do
combine(
data1Query.asFlow().mapOneOrNull(),
data2Query.asFlow().mapOneOrNull(),
data3Query.asFlow().mapOneOrNull()
)
etc, but as I said, all 3 get updated together in a transaction. Which means there would be bunch on unwanted emits for combine
when update happens
I know I could debounce
it, but feels wrong.
Is there a way library could handle this, same way it does for joins? Or is debouncing this a standard solution?gildor
10/24/2021, 2:59 PM