Skip to content

Commit 815b6a9

Browse files
author
Michael Anderson
committed
Updated readme
1 parent b13e9d4 commit 815b6a9

File tree

4 files changed

+47
-3
lines changed

4 files changed

+47
-3
lines changed

.vscode/tasks.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "install",
9+
"problemMatcher": []
10+
},
11+
{
12+
"type": "npm",
13+
"script": "publish",
14+
"isBackground": true,
15+
"problemMatcher": []
16+
},
17+
{
18+
"type": "npm",
19+
"script": "test",
20+
"problemMatcher": []
21+
}
22+
]
23+
}

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,23 @@
11
# database-js-sqlite
2-
Database-js Wrapper for SQLite Databases
2+
SQLite wrapper for database-js
3+
## About
4+
Database-js-mysql is a wrapper around the [sql.js](https://github.com/kripken/sql.js) package by lovasoa. It is intended to be used with the [database-js](https://github.com/mlaanderson/database-js) package.
5+
## Usage
6+
~~~~
7+
var Database = require('database-js2').Connection;
8+
9+
(async () => {
10+
let connection, statement, rows;
11+
connection = new Database('database-js-sqlite:///test.sqlite');
12+
13+
try {
14+
statement = await connection.prepareStatement("SELECT * FROM tablea WHERE user_name = ?");
15+
rows = await statement.query('not_so_secret_user');
16+
console.log(rows);
17+
} catch (error) {
18+
console.log(error);
19+
} finally {
20+
await connection.close();
21+
}
22+
})();
23+
~~~~

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "database-js-sqlite",
3-
"version": "1.0.0",
3+
"version": "1.0.2",
44
"description": "Database-js wrapper for SQLite",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)