Skip to content

Commit 761baa4

Browse files
update from master
2 parents ce6cd3d + 34e3161 commit 761baa4

7 files changed

+17
-267
lines changed

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

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';

pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: High-performance asynchronous interface for SQLite on Dart and Flut
33
version: 0.7.0-alpha.3
44
repository: https://github.com/powersync-ja/sqlite_async.dart
55
environment:
6-
sdk: ">=3.2.0 <4.0.0"
6+
sdk: '>=3.2.0 <4.0.0'
77

88
dependencies:
99
drift: ^2.15.0
@@ -13,7 +13,7 @@ dependencies:
1313
# url: https://github.com/powersync-ja/drift.git
1414
# ref: test # branch name
1515
# path: drift
16-
sqlite3: "^2.3.0"
16+
sqlite3: '^2.3.0'
1717
js: ^0.6.3
1818
async: ^2.10.0
1919
collection: ^1.17.0

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');

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

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

test/watch_shared_test.dart

-260
This file was deleted.

0 commit comments

Comments
 (0)