Skip to content

Commit 619cdf4

Browse files
committed
doc: added code sample to readme
1 parent edae93b commit 619cdf4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ final result = await db.transaction((txn) async {
103103
r'CREATE test SET name = $name;',
104104
bindings: {'name': 'John'},
105105
);
106+
if (somethingWrong) {
107+
txn.cancel();
108+
}
106109
});
107110
```
108111

0 commit comments

Comments
 (0)