2.0.5 • Published 6 years ago

enmap-sqlite v2.0.5

Weekly downloads
43
License
ISC
Repository
github
Last release
6 years ago

Enmap-SQLite

Enmap-SQLite is a provider for the Enmap module.

Installation

To install Enmap-SQLite simply run npm i enmap-sqlite.

Usage

// Load Enmap
const Enmap = require('enmap');
 
// Load EnmapSQLite
const EnmapSQLite = require('enmap-sqlite');
 
// Initialize the provider
const provider = new EnmapSQLite({ name: 'test' });
 
// Initialize the Enmap with the provider instance.
const myColl = new Enmap({ provider: provider });

Shorthand declaration:

const Enmap = require('enmap');
const EnmapSQLite = require('enmap-sqlite');
const myColl = new Enmap({ provider: new EnmapSQLite({ name: 'test' }); });

Options

// Example with all options.
const level = new EnmapSQLite({ 
  name: "test",
  dataDir: './data'
});

name

Defines the name of the table saved in sqlite.

dataDir

Indicates the relative or absolute directory where to hold the sqlite file. If multiple enmap use the same file, a new table is created for each. The filename is always enmap.sqlite.

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago