With sqldelight there's <https://cashapp.github.io...
# squarelibraries
j
With sqldelight there's https://cashapp.github.io/sqldelight/2.0.0/2.x/extensions/coroutines-extensions/app.cash.sqldelight.coroutines/as-flow.html to emit when the result of a query changes. I'd like to use this to trigger an action whenever the data in a table changes which I can do with
Copy code
SELECT * FROM users;
and consuming that as a flow, but I'm a little worried about memory usage. Can I somehow use the flow emission without loading the emitted data into memory?
d
You could use
SELECT count(*) FROM users;
j
Oh yeah good idea! Thanks a lot!