Skip to content

Commit d8d92f9

Browse files
Merge pull request #44 from powersync-ja/update-alpha-master
[Chore] Update Alpha with Master
2 parents ce6cd3d + b5fc3c9 commit d8d92f9

File tree

6 files changed

+15
-265
lines changed

6 files changed

+15
-265
lines changed

Diff for: CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## Next
2+
3+
- Add latest changes from master
4+
15
## 0.7.0-alpha.3
26

37
- Add latest changes from master

Diff for: lib/sqlite3_common.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// Exports common Sqlite3 exports which are available on web and ffi environments
1+
// Exports common Sqlite3 exports which are available in different environments.
22
export 'package:sqlite3/common.dart';

Diff for: test/native/basic_test.dart

+3-2
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,11 @@ void main() {
305305
// 4. Now second connection is ready. Second query has two connections to choose from.
306306
// 5. However, first connection is closed, so it's removed from the pool.
307307
// 6. Triggers `Concurrent modification during iteration: Instance(length:1) of '_GrowableList'`
308-
final db = await testUtils.setupDatabase(path: path, initStatements: [
308+
final db = SqliteDatabase.withFactory(
309+
await testUtils.testFactory(path: path, initStatements: [
309310
// Second connection to sleep more than first connection
310311
'SELECT test_sleep(test_connection_number() * 10)'
311-
]);
312+
]));
312313
await db.initialize();
313314

314315
final future1 = db.get('SELECT test_sleep(10) as sleep');

Diff for: test/utils/abstract_test_utils.dart

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ abstract class AbstractTestUtils {
2222
Future<TestDefaultSqliteOpenFactory> testFactory(
2323
{String? path,
2424
String sqlitePath = '',
25+
List<String> initStatements = const [],
2526
SqliteOptions options = const SqliteOptions.defaults()}) async {
2627
return TestDefaultSqliteOpenFactory(
27-
path: path ?? dbPath(), sqliteOptions: options);
28+
path: path ?? dbPath(),
29+
sqliteOptions: options,
30+
);
2831
}
2932

3033
/// Creates a SqliteDatabaseConnection

Diff for: test/utils/web_test_utils.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ class TestUtils extends AbstractTestUtils {
4040
Future<TestDefaultSqliteOpenFactory> testFactory(
4141
{String? path,
4242
String? sqlitePath,
43+
List<String> initStatements = const [],
4344
SqliteOptions options = const SqliteOptions.defaults()}) async {
4445
await _isInitialized;
45-
return super.testFactory(path: path, options: webOptions);
46+
return super.testFactory(
47+
path: path, options: webOptions, initStatements: initStatements);
4648
}
4749

4850
@override

Diff for: test/watch_shared_test.dart

-260
This file was deleted.

0 commit comments

Comments
 (0)