Skip to content

Commit 8f7497a

Browse files
authored
Update README.md
1 parent 4360450 commit 8f7497a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,19 @@ db.close();
2121
This module is still a work in progress. By design, it was created as an SQL backend for interaction-based Discord bots built in [discord.js v13](https://discord.js.org/#/docs/discord.js/v13/general/welcome). It is intended to create more user-friendly, asynchronous query functions on top of [node-sqlite3](https://www.npmjs.com/package/sqlite3), which take in "options" objects as arguments, a practice inspired by discord.js. While it can run any query asychronous, it currently only supports the following built-in query and expression functions:
2222

2323
- Queries
24-
- Insert
24+
- `insert({ table: string, columns?: string[], values: string[])`
25+
26+
Example:
27+
```javascript
28+
const id = '123456789';
29+
const username = 'user99';
30+
31+
await db.insert({
32+
table: 'users',
33+
columns: [ 'id', 'username' ],
34+
values: [ id, username ]
35+
});
36+
```
2537
- Select
2638
- Update
2739
- Delete

0 commit comments

Comments
 (0)