Curious about techniques people here have implemen...
# squarelibraries
b
Curious about techniques people here have implemented: how do you keep your views up to date with changes made to Sqldelight tables? Example: an api call returns a value which will be added to a row in your table. The view on the screen shows a count of the number of rows in that table, how would you get that data from the db to the view? Options in my mind are a) to asynchronously query the table once you receive a callback in your Presenter, then updating the view or model then view b) (somehow) View listens to the table change c) in-memory cached model which you separately increment in the Presenter’s api callback, which non-directly ends up tracking the values in the table (benefit here being cached + database backed if the app gets killed/reopened) Option C is what we’re doing now and i’m questioning whether the performance benefit outweighs the need to keep an extra version of what is in the tables