File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
packages/powersync/lib/src Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -551,10 +551,10 @@ packages:
551
551
dependency: "direct main"
552
552
description:
553
553
name: sqlite_async
554
- sha256: "609a8405b8b608ac396dd7f478ed42e230c496eb38fe53dd97e9c592e1cd5cda "
554
+ sha256: "139c8f1085132d0941b925efacb4fa0fed9ee40d624739cc26a051dbc36bf727 "
555
555
url: "https://pub.dev"
556
556
source: hosted
557
- version: "0.6.0 "
557
+ version: "0.6.1 "
558
558
stack_trace:
559
559
dependency: transitive
560
560
description:
Original file line number Diff line number Diff line change @@ -184,7 +184,12 @@ class PowerSyncDatabase with SqliteQueries implements SqliteConnection {
184
184
/// The connection is automatically re-opened if it fails for any reason.
185
185
///
186
186
/// Status changes are reported on [statusStream] .
187
- Future <void > connect ({required PowerSyncBackendConnector connector}) async {
187
+ Future <void > connect (
188
+ {required PowerSyncBackendConnector connector,
189
+
190
+ /// Throttle time between CRUD operations
191
+ /// Defaults to 10 milliseconds.
192
+ Duration crudThrottleTime = const Duration (milliseconds: 10 )}) async {
188
193
await initialize ();
189
194
190
195
// Disconnect if connected
@@ -212,8 +217,8 @@ class PowerSyncDatabase with SqliteQueries implements SqliteConnection {
212
217
});
213
218
} else if (action == 'init' ) {
214
219
SendPort port = data[1 ];
215
- var throttled = UpdateNotification . throttleStream (
216
- updates, const Duration (milliseconds : 10 ) );
220
+ var throttled =
221
+ UpdateNotification . throttleStream ( updates, crudThrottleTime );
217
222
updateSubscription = throttled.listen ((event) {
218
223
port.send (['update' ]);
219
224
});
You can’t perform that action at this time.
0 commit comments