JOIN table but not listen
Description
We have a table (call it Person) with a column that is updated very frequently (call it mood). And we have some queries that among other things JOIN to Person table. Example:
SELECT h.*, p.name FROM House h JOIN Person p ON h.ownerId = p.id;
To improve performance, we don't want this query to observe that Person table, especially since the query does not return the mood but only the name of person (we don't care so much if name changes). In the example, we just want the query to listen to House table.
One way I think would enable us do this is to add the query keys to the queryResultsChanged() function signature.
From fun queryResultsChanged() to fun queryResultsChanged(vararg queryKeys: String).
It would be nice if this becomes even more granular and queryResultsChanged also tells us which columns changed.
similar to https://github.com/sqldelight/sqldelight/issues/5153
Alternatively, we could solve this within SQLDelight, without changing the public APIs, by making queryKeys be <table>.<column> instead of <table>.
So, for instance, working with the same example query in this issue's description, instead of
driver.addListener("House", "Person", listener = listener)
the query generator would generate:
driver.addListener("House.*", "Person.name", listener = listener).
So update statements that modify only Person.mood will not invoke this listener.
@AlecKazakova @hfhbd is this a PR you'd consider merging if I produced it?