Skip to content

Commit 490e038

Browse files
Update README.md
1 parent 326a7f9 commit 490e038

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@
1818
1919
```
2020
#### CRUD Operation
21-
```
21+
```diff
2222
async function test(){
2323
const db= GithubDb({db:<DATABASE_NAME>,token:<TOKEN>});
2424

25-
const {identifier}=await db.add({document:"user"},{name:"John"});
25+
+ const {identifier}=await db.add({document:"user"},{name:"John"});
2626
console.log("added user", identifier);
2727

28-
const user=await db.fetchOne({document:"user",identifier});
28+
+ const user=await db.fetchOne({document:"user",identifier});
2929
console.log("fetched user", user);
3030

31-
const updated=await db.update({document:"user",identifier},{name:"John Cena"});
31+
+ const updated=await db.update({document:"user",identifier},{name:"John Cena"});
3232
console.log("updated user", updated);
3333

34-
const users=await db.fetchAll({document:"user"});
34+
+ const users=await db.fetchAll({document:"user"});
3535
console.log("fetched users", users);
3636
for (const {identifier} of users) {
37-
const result=await db.delete({document:"user",identifier});
37+
+ const result=await db.delete({document:"user",identifier});
3838
console.log("delete users", result);
3939
}
4040
}

0 commit comments

Comments
 (0)