We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86c4a0b commit 0cc9c90Copy full SHA for 0cc9c90
powersync/src/db/watch.rs
@@ -150,7 +150,11 @@ struct EmitAll {
150
}
151
152
impl TableListenerState {
153
- /// If the dirty flag is set, clears it and returns `true`. Otherwise returns `false`.
+ /// If there is an outstanding event, consumes and returns it.
154
+ ///
155
+ /// For listeners that emit events when a matched table is updated, the event is always going to
156
+ /// be an empty set (which doesn't require an allocation to create). For a listener that matches
157
+ /// all tables, we need to emit the actual tables that have been updated in the meantime.
158
fn take_updates(&self) -> Option<HashSet<String>> {
159
self.config.take_updates()
160
0 commit comments