Skip to content

Commit 5553fb7

Browse files
committed
feat: added db.patch method to the surrealdb_wasm example and specified surrealdb_wasm version ^0.7.0+4
1 parent 6b9e457 commit 5553fb7

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

example/lib/main.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,16 @@ class _HomePageState extends State<HomePage> {
150150
'db.merge()',
151151
);
152152

153+
await execute(
154+
() => db.patch(
155+
created['id'],
156+
[
157+
{'op': 'replace', 'path': '/status', 'value': 'completed'},
158+
],
159+
),
160+
'db.patch()',
161+
);
162+
153163
// batch inserts
154164
await execute(
155165
() {

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
sdk: flutter
1212

1313
flutter_console_widget: ^0.0.3
14-
surrealdb_wasm:
14+
surrealdb_wasm: ^0.7.0+4
1515

1616
dev_dependencies:
1717
flutter_test:

0 commit comments

Comments
 (0)