Skip to content

Commit 4304be1

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

File tree

1 file changed

+25
-21
lines changed

1 file changed

+25
-21
lines changed

README.md

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PromiseSQL
1+
# :hatching_chick: PromiseSQL
22
A lightweight module for running simple, promise-based SQLite3 queries in node.js. It works best in smaller projects with a lot of asynchronous development, e.g., a Discord bot with slash commands.
33

44
```javascript
@@ -18,27 +18,31 @@ db.open('./database.db');
1818
db.close();
1919
```
2020

21-
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:
22-
23-
- Queries
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-
```
37-
- Select
38-
- Update
39-
- Delete
40-
- Expressions
21+
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 an "options" object as arguments, a practice inspired by discord.js.
22+
23+
While it can run any query asychronously, it currently only supports the following built-in query and expression functions:
24+
25+
## Queries
26+
27+
### Insert
28+
`insert({ table: string, columns?: string[], values: string[])`
29+
```javascript
30+
const id = '123456789';
31+
const username = 'user99';
32+
33+
await db.insert({
34+
table: 'users',
35+
columns: [ 'id', 'username' ],
36+
values: [ id, username ]
37+
});
38+
```
39+
40+
### Select
41+
### Update
42+
### Delete
43+
## Expressions
4144
- Boolean
4245
- Aggregate
4346

47+
## Future plans
4448
Presently, there are no plans to add functionality such as creating tables, attaching databases, etc. For now, I handle operations like that with [DB Browser](https://sqlitebrowser.org/), which is a great tool for managing tables and data in small SQLite3 databases.

0 commit comments

Comments
 (0)