1.3.0 • Published 6 years ago

nano-trivial v1.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Nano-Trivial

TrivialDB Driver for nanoSQL

Lets you use TrivialDB as a backend datastore for nanoSQL.

TrivialDB is a simple JSON file storage database. All changes are saved to disk as JSON files allowing you to easily view and edit database contents.

NPM

Documentation

Installation

npm i --save nano-trivial

Usage

import { nSQL } from "nano-sql";
import { TrivialAdapter } from "nano-trivial";

nSQL("table")
.model([...])
.config({
    mode: new TrivialAdapter(),
    ...other config options
}).connect()...

That's it, now everything NanoSQL can do you can do with TrivialDB.

Read about NanoSQL here.

API

When you call new TrivialAdapter there are two optional arguments, namespace arguments and database arguments.

The namespace arguments are documented here and mostly allow you to adjust the location the files are saved to.

The database arguments are documented here and allow you to do more advanced things like controlling wethere the JSON files are pretty printed or not.

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago