Enmap-SQLite
Enmap-SQLite is a provider for the Enmap module.
Installation
To install Enmap-SQLite simply run npm i enmap-sqlite
.
Usage
// Load Enmapconst Enmap = ; // Load EnmapSQLiteconst EnmapSQLite = ; // Initialize the providerconst provider = name: 'test' ; // Initialize the Enmap with the provider instance.const myColl = provider: provider ;
Shorthand declaration:
const Enmap = ;const EnmapSQLite = ;const myColl = provider: name: 'test' ; ;
Options
// Example with all options.const level = 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
.