File tree 5 files changed +46
-13
lines changed
packages/drift_sqlite_async
5 files changed +46
-13
lines changed Original file line number Diff line number Diff line change @@ -11,22 +11,23 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
12
12
Packages with breaking changes:
13
13
14
- - There are no breaking changes in this release.
14
+ - There are no breaking changes in this release.
15
15
16
16
Packages with other changes:
17
17
18
- - [ ` sqlite_async ` - ` v0.8.1 ` ] ( #sqlite_async---v081 )
19
- - [ ` drift_sqlite_async ` - ` v0.1.0-alpha.3 ` ] ( #drift_sqlite_async---v010-alpha3 )
18
+ - [ ` sqlite_async ` - ` v0.8.1 ` ] ( #sqlite_async---v081 )
19
+ - [ ` drift_sqlite_async ` - ` v0.1.0-alpha.4 ` ] ( #drift_sqlite_async---v010-alpha4 )
20
20
21
21
Packages with dependency updates only:
22
22
23
23
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
24
24
25
- - ` drift_sqlite_async ` - ` v0.1.0-alpha.3 `
25
+ #### ` drift_sqlite_async ` - ` v0.1.0-alpha.4 `
26
+
27
+ - ** FEAT** : web support.
26
28
27
29
---
28
30
29
31
#### ` sqlite_async ` - ` v0.8.1 `
30
32
31
- - ** FEAT** : use navigator locks.
32
-
33
+ - ** FEAT** : use navigator locks.
Original file line number Diff line number Diff line change
1
+ ## 0.1.0-alpha.4
2
+
3
+ - Import ` sqlite3_common ` instead of ` sqlite3 ` for web support.
4
+
1
5
## 0.1.0-alpha.3
2
6
3
- - Update a dependency to the latest release.
7
+ - Update a dependency to the latest release.
4
8
5
9
## 0.1.0-alpha.2
6
10
Original file line number Diff line number Diff line change 3
3
` drift_sqlite_async ` allows using drift on an sqlite_async database - the APIs from both can be seamlessly used together in the same application.
4
4
5
5
Supported functionality:
6
+
6
7
1 . All queries including select, insert, update, delete.
7
8
2 . Transactions and nested transactions.
8
9
3 . Table updates are propagated between sqlite_async and Drift - watching queries works using either API.
9
10
4 . Select queries can run concurrently with writes and other select statements.
10
11
11
-
12
12
## Usage
13
13
14
14
Use ` SqliteAsyncDriftConnection ` to create a DatabaseConnection / QueryExecutor for Drift from the sqlite_async SqliteDatabase:
@@ -59,4 +59,24 @@ These events are only sent while no write transaction is active.
59
59
60
60
Within Drift's transactions, Drift's own update notifications will still apply for watching queries within that transaction.
61
61
62
- Note: There is a possibility of events being duplicated. This should not have a significant impact on most applications.
62
+ Note: There is a possibility of events being duplicated. This should not have a significant impact on most applications.
63
+
64
+ ## Web
65
+
66
+ Note: Web support is currently in Beta.
67
+
68
+ Web support requires Sqlite3 WASM and web worker Javascript files to be accessible. These file need to be put into the ` web/ ` directory of your app.
69
+
70
+ The compiled web worker files can be found in our Github [ releases] ( https://github.com/powersync-ja/sqlite_async.dart/releases )
71
+ The ` sqlite3.wasm ` asset can be found [ here] ( https://github.com/simolus3/sqlite3.dart/releases )
72
+
73
+ In the end your ` web/ ` directory will look like the following
74
+
75
+ ```
76
+ web/
77
+ ├── favicon.png
78
+ ├── index.html
79
+ ├── manifest.json
80
+ ├── db_worker.js
81
+ └── sqlite3.wasm
82
+ ```
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import 'dart:async';
2
2
3
3
import 'package:drift/backends.dart' ;
4
4
import 'package:drift_sqlite_async/src/transaction_executor.dart' ;
5
- import 'package:sqlite_async/sqlite3 .dart' ;
5
+ import 'package:sqlite_async/sqlite3_common .dart' ;
6
6
import 'package:sqlite_async/sqlite_async.dart' ;
7
7
8
8
class _SqliteAsyncDelegate extends DatabaseDelegate {
Original file line number Diff line number Diff line change 1
1
name : drift_sqlite_async
2
- version : 0.1.0-alpha.3
2
+ version : 0.1.0-alpha.4
3
3
homepage : https://github.com/powersync-ja/sqlite_async.dart
4
4
repository : https://github.com/powersync-ja/sqlite_async.dart
5
5
description : Use Drift with a sqlite_async database, allowing both to be used in the same application.
@@ -14,12 +14,20 @@ topics:
14
14
environment :
15
15
sdk : " >=3.0.0 <4.0.0"
16
16
dependencies :
17
- drift : ^ 2.15.0
17
+ drift : " >= 2.15.0 <2.19.0 "
18
18
sqlite_async : ^0.8.1
19
19
dev_dependencies :
20
20
build_runner : ^2.4.8
21
- drift_dev : ^ 2.15.0
21
+ drift_dev : " >= 2.15.0 <2.19.0 "
22
22
glob : ^2.1.2
23
23
sqlite3 : ^2.4.0
24
24
test : ^1.25.2
25
25
test_api : ^0.7.0
26
+
27
+ platforms :
28
+ android :
29
+ ios :
30
+ linux :
31
+ macos :
32
+ windows :
33
+ web :
You can’t perform that action at this time.
0 commit comments