Hi all! I use SqlDelight multiplatform and I have ...
# squarelibraries
n
Hi all! I use SqlDelight multiplatform and I have a problem where a column is triggered via
.asFlow()
when another column is updated. What is the reason for this trigger and how to avoid it?
j
Currently all mutator operations on a table trigger all queries on that table
Making the notification system more granular is hard, and also implementation detail
It's better to requery too much than miss one
n
Thanks! Interestingly, only the individual columns of affected row are updated when asFlow is used, but not the whole
select *
row
Which is again also confusing because if I look at generated queries then they are triggered to update by that ID.
h
You could write your own driver and match the id of the query to you logic notifying only a part of your tables, but the id is autogenerated based on the sql string hashcode (and some more to avoid collusions) so I doubt you want to implement it but get more update. But using views could be a better idea.