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:
551551 dependency: "direct main"
552552 description:
553553 name: sqlite_async
554- sha256: "609a8405b8b608ac396dd7f478ed42e230c496eb38fe53dd97e9c592e1cd5cda "
554+ sha256: "139c8f1085132d0941b925efacb4fa0fed9ee40d624739cc26a051dbc36bf727 "
555555 url: "https://pub.dev"
556556 source: hosted
557- version: "0.6.0 "
557+ version: "0.6.1 "
558558 stack_trace:
559559 dependency: transitive
560560 description:
Original file line number Diff line number Diff line change @@ -184,7 +184,12 @@ class PowerSyncDatabase with SqliteQueries implements SqliteConnection {
184184 /// The connection is automatically re-opened if it fails for any reason.
185185 ///
186186 /// 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 {
188193 await initialize ();
189194
190195 // Disconnect if connected
@@ -212,8 +217,8 @@ class PowerSyncDatabase with SqliteQueries implements SqliteConnection {
212217 });
213218 } else if (action == 'init' ) {
214219 SendPort port = data[1 ];
215- var throttled = UpdateNotification . throttleStream (
216- updates, const Duration (milliseconds : 10 ) );
220+ var throttled =
221+ UpdateNotification . throttleStream ( updates, crudThrottleTime );
217222 updateSubscription = throttled.listen ((event) {
218223 port.send (['update' ]);
219224 });
You can’t perform that action at this time.
0 commit comments