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:
3232 include :
3333 - sqlite_version : " 3440200"
3434 sqlite_url : " https://www.sqlite.org/2023/sqlite-autoconf-3440200.tar.gz"
35- dart_sdk : 3.3.3
35+ dart_sdk : 3.4.0
3636 - sqlite_version : " 3430200"
3737 sqlite_url : " https://www.sqlite.org/2023/sqlite-autoconf-3430200.tar.gz"
38- dart_sdk : 3.3.3
38+ dart_sdk : 3.4.0
3939 - sqlite_version : " 3420000"
4040 sqlite_url : " https://www.sqlite.org/2023/sqlite-autoconf-3420000.tar.gz"
41- dart_sdk : 3.3.3
41+ dart_sdk : 3.4.0
4242 - sqlite_version : " 3410100"
4343 sqlite_url : " https://www.sqlite.org/2023/sqlite-autoconf-3410100.tar.gz"
44- dart_sdk : 3.3.3
44+ dart_sdk : 3.4.0
4545 - sqlite_version : " 3380000"
4646 sqlite_url : " https://www.sqlite.org/2022/sqlite-autoconf-3380000.tar.gz"
47- dart_sdk : 3.3.3
47+ dart_sdk : 3.4.0
4848 steps :
4949 - uses : actions/checkout@v3
5050 - 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+
17## 0.6.1
28
39- Fix errors when closing a ` SqliteDatabase ` .
Original file line number Diff line number Diff line change 1- import 'dart:async' ;
21import 'dart:io' ;
32import 'dart:isolate' ;
43
@@ -11,8 +10,8 @@ class TestOpenFactory extends DefaultSqliteOpenFactory {
1110 TestOpenFactory ({required super .path, super .sqliteOptions});
1211
1312 @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);
1615
1716 db.createFunction (
1817 functionName: 'sleep' ,
Original file line number Diff line number Diff line change 1- import 'dart:async' ;
21import 'dart:ffi' ;
32
43import 'package:sqlite3/common.dart' ;
@@ -17,7 +16,7 @@ class TestOpenFactory extends DefaultSqliteOpenFactory {
1716 this .sqlitePath = defaultSqlitePath});
1817
1918 @override
20- FutureOr < CommonDatabase > open (SqliteOpenOptions options) async {
19+ CommonDatabase open (SqliteOpenOptions options) {
2120 // For details, see:
2221 // https://pub.dev/packages/sqlite3#manually-providing-sqlite3-libraries
2322 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> {
1515 String get path;
1616
1717 /// Opens a direct connection to the SQLite database
18- FutureOr < Database > open (SqliteOpenOptions options);
18+ Database open (SqliteOpenOptions options);
1919
2020 /// Opens an asynchronous [SqliteConnection]
2121 FutureOr <SqliteConnection > openConnection (SqliteOpenOptions options);
@@ -77,14 +77,14 @@ abstract class AbstractDefaultSqliteOpenFactory<
7777 @protected
7878
7979 /// Opens a direct connection to a SQLite database connection
80- FutureOr < Database > openDB (SqliteOpenOptions options);
80+ Database openDB (SqliteOpenOptions options);
8181
8282 @override
8383
8484 /// Opens a direct connection to a SQLite database connection
8585 /// 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);
8888
8989 // Pragma statements don't have the same BUSY_TIMEOUT behavior as normal statements.
9090 // 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 {
264264 await client.post (const InitDb ());
265265 }
266266
267- final db = await params.openFactory.open (SqliteOpenOptions (
267+ final db = params.openFactory.open (SqliteOpenOptions (
268268 primaryConnection: params.primary, readOnly: params.readOnly));
269269
270270 runZonedGuarded (() async {
Original file line number Diff line number Diff line change 11name : sqlite_async
22description : High-performance asynchronous interface for SQLite on Dart and Flutter.
3- version : 0.6.1
3+ version : 0.7.0
44repository : https://github.com/powersync-ja/sqlite_async.dart
55environment :
66 sdk : " >=3.2.0 <4.0.0"
77
88dependencies :
9- sqlite3 : " ^2.3.0 "
9+ sqlite3 : " ^2.4.4 "
1010 async : ^2.10.0
1111 collection : ^1.17.0
1212 meta : ^1.10.0
Original file line number Diff line number Diff line change @@ -21,11 +21,11 @@ class TestSqliteOpenFactory extends TestDefaultSqliteOpenFactory {
2121 initStatements});
2222
2323 @override
24- FutureOr < CommonDatabase > open (SqliteOpenOptions options) async {
24+ CommonDatabase open (SqliteOpenOptions options) {
2525 sqlite_open.open.overrideFor (sqlite_open.OperatingSystem .linux, () {
2626 return DynamicLibrary .open (sqlitePath);
2727 });
28- final db = await super .open (options);
28+ final db = super .open (options);
2929
3030 db.createFunction (
3131 functionName: 'test_sleep' ,
You can’t perform that action at this time.
0 commit comments