@gavinhsmith/simpledb
simpledb
A node module for creating/managing easy-access SQLite databases.
Install
Install simpledb via your favorite package manager.
NPM
npm install @gavinhsmith/simpledb
Yarn
yarn add @gavinhsmith/simpledb
Usage
TypeDoc Files can be found at the API Docs.
Include in your project create a new instace of the Database class.
// Import the module.
import Database from "@gavinhsmith/simpledb";
// Load the database.
const db = Database("file.db");
// Qeury the database.
db.table("users").allEntries().then((entries) => {...});
Config
Module can be configed in the Database constructor.
const db = Database("file.db", {
verbose: true,
});
Config Options
| Config Option | Type | Default | Description |
|---|---|---|---|
| verbose | boolean |
false |
Enables sqlite3.verbose() and enables verbose logging throughout the module. |
Contributing
Clone the repository, and run npm i or yarn to install the dependancies and build the module. Run module tests via the test script in package.json.
Workflow tests require act. You do not need this for module development, as workflow tests are not run during CI.
I'll review pull requests in time.