Skip to content

Commit 3aa3c9d

Browse files
committed
fix README
1 parent 3e08070 commit 3aa3c9d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Features:
44

55
1. Design for ARC/ORC, no need manually close connection
66
2. Use `importdb` macro to create helper function (see examples)
7+
3. Including a memfs implemention (may better than `:memory:` database since it support WAL mode)
78

89
## Example
910

@@ -44,8 +45,12 @@ const dataset = {
4445
"D": 3,
4546
}.toTable
4647
db.create_table()
47-
for name, value in dataset:
48-
db.insert_data name, value
48+
# Use transaction (commit by default)
49+
db.transaction:
50+
for name, value in dataset:
51+
db.insert_data name, value
52+
commit() # optional
53+
# Never goes here
4954
5055
for name, value in db.iterate_data():
5156
assert name in dataset

0 commit comments

Comments
 (0)