Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
m4heshd committed Dec 30, 2021
1 parent 6a7de83 commit 1a0ee09
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ npm install better-sqlite3-multiple-ciphers
npm install better-sqlite3-multiple-ciphers@beta
```

> You must be using Node.js v10.20.1 or above. Prebuilt binaries are available for Node.js [LTS versions](https://nodejs.org/en/about/releases/) and Electron.
> You must be using Node.js v10.20.1 or above. Prebuilt binaries are available for Node.js [LTS versions](https://nodejs.org/en/about/releases/) and Electron. If you have trouble installing, check the [troubleshooting guide](./docs/troubleshooting.md).
> If you have trouble installing, check the [troubleshooting guide](./docs/troubleshooting.md).
Expand All @@ -76,6 +76,13 @@ const row = db.prepare('SELECT * FROM users WHERE id = ?').get(userId);
console.log(row.firstName, row.lastName, row.email);
```

##### In ES6 module notation:

```js
import Database from 'better-sqlite3-multiple-ciphers';
const db = new Database('foobar.db', options);
```

### Encryption

A database can be encrypted and decrypted simply using `key` and `rekey` `PRAGMA` statements.
Expand Down

0 comments on commit 1a0ee09

Please sign in to comment.