Skip to content

A node module for creating/managing easy-access SQLite databases.

License

Notifications You must be signed in to change notification settings

gavinhsmith/simpledb

Repository files navigation

simpledb

A node module for creating/managing easy-access SQLite databases.

NPM Version NPM Downloads License

Install

Install simpledb via your favorite package manager.

npm install @gavinhsmith/simpledb
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.

About

A node module for creating/managing easy-access SQLite databases.

Resources

License

Stars

Watchers

Forks

Packages