Updated README

This commit is contained in:
Ben Ashton 2021-03-04 22:14:08 -08:00
parent 308c1f3709
commit 75f0921cce

View File

@ -1,6 +1,6 @@
# PawSQLite WebSQL Adapter # PawSQLite Node Adapter
A WebSQL adapter for PawSQLite which offers many improvements over working with WebSQL natively. Most importantly, transactions do not commit automatically. This allows you to perform asynchronous operations during transactions and still guarantee data integrity. A Node adapter for PawSQLite using the [sqlite3 package](https://www.npmjs.com/package/sqlite3).
## Installation ## Installation
@ -8,7 +8,7 @@ You can install using npm:
```bash ```bash
npm install -s git+https://git.n0m.org/n0m/PawSQLite.git npm install -s git+https://git.n0m.org/n0m/PawSQLite.git
npm install -s git+https://git.n0m.org/n0m/PawSQLite-WebSQL-Adapter.git npm install -s git+https://git.n0m.org/n0m/PawSQLite-Node-Adapter.git
``` ```
## Usage ## Usage
@ -17,12 +17,12 @@ For more detailed usage, please see: [https://git.n0m.org/n0m/PawSQLite](https:/
```javascript ```javascript
const PawSQLite = require("pawsqlite"); const PawSQLite = require("pawsqlite");
const PawSQLiteWebSQLAdapter = require("pawsqlite-websql-adapter"); const PawSQLiteNodeAdapter = require("pawsqlite-node-adapter");
PawSQLite.registerAdapter(PawSQLiteWebSQLAdapter) PawSQLite.registerAdapter(PawSQLiteNodeAdapter)
const db = await PawSQLite.open("test", { const db = await PawSQLite.open("test", {
adapter: 'PawSQLiteWebSQLAdapter' adapter: 'PawSQLiteNodeAdapter'
}); });
await db.sql(` await db.sql(`