File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1
1
import 'dart:async' ;
2
- import 'package:universal_io/io.dart' ;
3
2
import 'dart:math' ;
4
3
4
+ import 'package:meta/meta.dart' ;
5
5
import 'package:powersync_core/sqlite_async.dart' ;
6
6
import 'package:powersync_core/src/open_factory/common_db_functions.dart' ;
7
7
import 'package:sqlite_async/sqlite3_common.dart' ;
@@ -70,6 +70,11 @@ abstract class AbstractPowerSyncOpenFactory extends DefaultSqliteOpenFactory {
70
70
/// Returns the library name for the current platform.
71
71
/// [path] is optional and is used when the library is not in the default location.
72
72
String getLibraryForPlatform ({String ? path});
73
+
74
+ /// On native platforms, synchronously pauses the current isolate for the
75
+ /// given [Duration] .
76
+ @visibleForOverriding
77
+ void sleep (Duration duration) {}
73
78
}
74
79
75
80
/// Advanced: Define custom setup for each SQLite connection.
Original file line number Diff line number Diff line change
1
+ import 'dart:io' ;
2
+ import 'dart:io' as io;
1
3
import 'dart:ffi' ;
2
4
3
5
import 'package:powersync_core/src/exceptions.dart' ;
4
6
import 'package:powersync_core/src/log.dart' ;
5
- import 'package:universal_io/io.dart' ;
6
7
import 'dart:isolate' ;
7
8
import 'package:powersync_core/src/open_factory/abstract_powersync_open_factory.dart' ;
8
9
import 'package:sqlite_async/sqlite3.dart' as sqlite;
@@ -109,4 +110,9 @@ class PowerSyncOpenFactory extends AbstractPowerSyncOpenFactory {
109
110
);
110
111
}
111
112
}
113
+
114
+ @override
115
+ void sleep (Duration duration) {
116
+ io.sleep (duration);
117
+ }
112
118
}
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ dependencies:
14
14
sqlite3 : ^2.4.6
15
15
# We implement a database controller, which is an interface of sqlite3_web.
16
16
sqlite3_web : ^0.3.2
17
- universal_io : ^2.0.0
18
17
meta : ^1.0.0
19
18
http : ^1.5.0
20
19
uuid : ^4.2.0
You can’t perform that action at this time.
0 commit comments