Skip to content

Commit 08d11a9

Browse files
committed
More cleanup
1 parent 9656154 commit 08d11a9

File tree

5 files changed

+6
-27
lines changed

5 files changed

+6
-27
lines changed

packages/powersync_core/lib/src/sync/bucket_storage.dart

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -365,22 +365,6 @@ UPDATE ps_buckets SET count_since_last = 0, count_at_last = ?1->name
365365
});
366366
}
367367

368-
Future<String> control(String op, [Object? payload]) async {
369-
return await writeTransaction(
370-
(tx) async {
371-
final [row] =
372-
await tx.execute('SELECT powersync_control(?, ?)', [op, payload]);
373-
return row.columnAt(0) as String;
374-
},
375-
// We flush when powersync_control yields an instruction to do so.
376-
flush: false,
377-
);
378-
}
379-
380-
Future<void> flushFileSystem() async {
381-
// Noop outside of web.
382-
}
383-
384368
/// Note: The asynchronous nature of this is due to this needing a global
385369
/// lock. The actual database operations are still synchronous, and it
386370
/// is assumed that multiple functions on this instance won't be called

packages/powersync_core/lib/src/sync/sync_status.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,6 @@ extension type const BucketPriority._(int priorityNumber) {
189189
/// A [Comparator] instance suitable for comparing [BucketPriority] values.
190190
static int comparator(BucketPriority a, BucketPriority b) =>
191191
-a.priorityNumber.compareTo(b.priorityNumber);
192-
193-
/// The priority used by PowerSync to indicate that a full sync was completed.
194-
static const fullSyncPriority = BucketPriority._(2147483647);
195192
}
196193

197194
/// Partial information about the synchronization status for buckets within a

packages/powersync_core/lib/src/web/sync_worker.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ class _ConnectedClient {
7171
final recoveredOptions = SyncOptions(
7272
crudThrottleTime:
7373
Duration(milliseconds: request.crudThrottleTimeMs),
74-
retryDelay: Duration(milliseconds: request.retryDelayMs),
74+
retryDelay: switch (request.retryDelayMs) {
75+
null => null,
76+
final retryDelay => Duration(milliseconds: retryDelay),
77+
},
7578
params: switch (request.syncParamsEncoded) {
7679
null => null,
7780
final encodedParams =>

packages/powersync_core/lib/src/web/sync_worker_protocol.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ extension type StartSynchronization._(JSObject _) implements JSObject {
6969
required String databaseName,
7070
required int crudThrottleTimeMs,
7171
required int requestId,
72-
required int retryDelayMs,
72+
required int? retryDelayMs,
7373
String? syncParamsEncoded,
7474
});
7575

7676
external String get databaseName;
7777
external int get requestId;
7878
external int get crudThrottleTimeMs;
79-
external int get retryDelayMs;
79+
external int? get retryDelayMs;
8080
external String? get syncParamsEncoded;
8181
}
8282

packages/powersync_core/lib/src/web/web_bucket_storage.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,4 @@ class WebBucketStorage extends BucketStorage {
1717
return _webDb.writeTransaction(callback,
1818
lockTimeout: lockTimeout, flush: flush);
1919
}
20-
21-
@override
22-
Future<void> flushFileSystem() {
23-
return _webDb.flush();
24-
}
2520
}

0 commit comments

Comments
 (0)