@keyv/sqlite
v3.0.0 sqlite sql keyv storage adapter key value store cache and 2 more...
@keyv/sqlite
SQLite storage adapter for Keyv
SQLite storage adapter for Keyv.
Install
npm install --save keyv @keyv/sqlite
Usage
import Keyv from 'keyv';
import KeyvSqlite from '@keyv/sqlite';
const keyv = new Keyv(new KeyvSqlite('sqlite://path/to/database.sqlite'));
keyv.on('error', handleConnectionError);
You can specify the table
and busyTimeout
option.
e.g:
import Keyv from 'keyv';
import KeyvSqlite from '@keyv/sqlite';
const keyvSqlite = new KeyvSqlite('sqlite://path/to/database.sqlite', {
table: 'cache',
busyTimeout: 10000
});
const keyv = new Keyv({ store: keyvSqlite });
License
npm i @keyv/[email protected]
Metadata
- MIT
- Whatever
- Jared Wray
- released 1/25/2022