File tree Expand file tree Collapse file tree 8 files changed +23
-19
lines changed Expand file tree Collapse file tree 8 files changed +23
-19
lines changed Original file line number Diff line number Diff line change @@ -32,19 +32,19 @@ jobs:
32
32
include :
33
33
- sqlite_version : " 3440200"
34
34
sqlite_url : " https://www.sqlite.org/2023/sqlite-autoconf-3440200.tar.gz"
35
- dart_sdk : 3.3.3
35
+ dart_sdk : 3.4.0
36
36
- sqlite_version : " 3430200"
37
37
sqlite_url : " https://www.sqlite.org/2023/sqlite-autoconf-3430200.tar.gz"
38
- dart_sdk : 3.3.3
38
+ dart_sdk : 3.4.0
39
39
- sqlite_version : " 3420000"
40
40
sqlite_url : " https://www.sqlite.org/2023/sqlite-autoconf-3420000.tar.gz"
41
- dart_sdk : 3.3.3
41
+ dart_sdk : 3.4.0
42
42
- sqlite_version : " 3410100"
43
43
sqlite_url : " https://www.sqlite.org/2023/sqlite-autoconf-3410100.tar.gz"
44
- dart_sdk : 3.3.3
44
+ dart_sdk : 3.4.0
45
45
- sqlite_version : " 3380000"
46
46
sqlite_url : " https://www.sqlite.org/2022/sqlite-autoconf-3380000.tar.gz"
47
- dart_sdk : 3.3.3
47
+ dart_sdk : 3.4.0
48
48
steps :
49
49
- uses : actions/checkout@v3
50
50
- uses : dart-lang/setup-dart@v1
Original file line number Diff line number Diff line change
1
+ ## 0.7.0
2
+
3
+ - BREAKING CHANGE: Update all Database types to use a ` CommonDatabase ` interface.
4
+ - Update ` openDB ` and ` open ` methods to be synchronous.
5
+ - Fix ` ArgumentError (Invalid argument(s): argument value for 'return_value' is null) ` in sqlite3 when closing the database connection by upgrading to version 2.4.4.
6
+
1
7
## 0.6.1
2
8
3
9
- Fix errors when closing a ` SqliteDatabase ` .
Original file line number Diff line number Diff line change 1
- import 'dart:async' ;
2
1
import 'dart:io' ;
3
2
import 'dart:isolate' ;
4
3
@@ -11,8 +10,8 @@ class TestOpenFactory extends DefaultSqliteOpenFactory {
11
10
TestOpenFactory ({required super .path, super .sqliteOptions});
12
11
13
12
@override
14
- FutureOr < CommonDatabase > open (SqliteOpenOptions options) async {
15
- final db = await super .open (options);
13
+ CommonDatabase open (SqliteOpenOptions options) {
14
+ final db = super .open (options);
16
15
17
16
db.createFunction (
18
17
functionName: 'sleep' ,
Original file line number Diff line number Diff line change 1
- import 'dart:async' ;
2
1
import 'dart:ffi' ;
3
2
4
3
import 'package:sqlite3/common.dart' ;
@@ -17,7 +16,7 @@ class TestOpenFactory extends DefaultSqliteOpenFactory {
17
16
this .sqlitePath = defaultSqlitePath});
18
17
19
18
@override
20
- FutureOr < CommonDatabase > open (SqliteOpenOptions options) async {
19
+ CommonDatabase open (SqliteOpenOptions options) {
21
20
// For details, see:
22
21
// https://pub.dev/packages/sqlite3#manually-providing-sqlite3-libraries
23
22
sqlite_open.open.overrideFor (sqlite_open.OperatingSystem .linux, () {
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ abstract class SqliteOpenFactory<Database extends sqlite.CommonDatabase> {
15
15
String get path;
16
16
17
17
/// Opens a direct connection to the SQLite database
18
- FutureOr < Database > open (SqliteOpenOptions options);
18
+ Database open (SqliteOpenOptions options);
19
19
20
20
/// Opens an asynchronous [SqliteConnection]
21
21
FutureOr <SqliteConnection > openConnection (SqliteOpenOptions options);
@@ -77,14 +77,14 @@ abstract class AbstractDefaultSqliteOpenFactory<
77
77
@protected
78
78
79
79
/// Opens a direct connection to a SQLite database connection
80
- FutureOr < Database > openDB (SqliteOpenOptions options);
80
+ Database openDB (SqliteOpenOptions options);
81
81
82
82
@override
83
83
84
84
/// Opens a direct connection to a SQLite database connection
85
85
/// and executes setup pragma statements to initialize the DB
86
- FutureOr < Database > open (SqliteOpenOptions options) async {
87
- var db = await openDB (options);
86
+ Database open (SqliteOpenOptions options) {
87
+ var db = openDB (options);
88
88
89
89
// Pragma statements don't have the same BUSY_TIMEOUT behavior as normal statements.
90
90
// We add a manual retry loop for those.
Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ void _sqliteConnectionIsolate(_SqliteConnectionParams params) async {
264
264
await client.post (const InitDb ());
265
265
}
266
266
267
- final db = await params.openFactory.open (SqliteOpenOptions (
267
+ final db = params.openFactory.open (SqliteOpenOptions (
268
268
primaryConnection: params.primary, readOnly: params.readOnly));
269
269
270
270
runZonedGuarded (() async {
Original file line number Diff line number Diff line change 1
1
name : sqlite_async
2
2
description : High-performance asynchronous interface for SQLite on Dart and Flutter.
3
- version : 0.6.1
3
+ version : 0.7.0
4
4
repository : https://github.com/powersync-ja/sqlite_async.dart
5
5
environment :
6
6
sdk : " >=3.2.0 <4.0.0"
7
7
8
8
dependencies :
9
- sqlite3 : " ^2.3.0 "
9
+ sqlite3 : " ^2.4.4 "
10
10
async : ^2.10.0
11
11
collection : ^1.17.0
12
12
meta : ^1.10.0
Original file line number Diff line number Diff line change @@ -21,11 +21,11 @@ class TestSqliteOpenFactory extends TestDefaultSqliteOpenFactory {
21
21
initStatements});
22
22
23
23
@override
24
- FutureOr < CommonDatabase > open (SqliteOpenOptions options) async {
24
+ CommonDatabase open (SqliteOpenOptions options) {
25
25
sqlite_open.open.overrideFor (sqlite_open.OperatingSystem .linux, () {
26
26
return DynamicLibrary .open (sqlitePath);
27
27
});
28
- final db = await super .open (options);
28
+ final db = super .open (options);
29
29
30
30
db.createFunction (
31
31
functionName: 'test_sleep' ,
You can’t perform that action at this time.
0 commit comments