@keyv/sqlite
TypeScript icon, indicating that this package has built-in type declarations

4.0.1 • Public • Published

@keyv/sqlite keyv

SQLite storage adapter for Keyv

build codecov npm npm

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

MIT © Jared Wray

Package Sidebar

Install

npm i @keyv/sqlite

Weekly Downloads

4,972

Version

4.0.1

License

MIT

Unpacked Size

17.4 kB

Total Files

9

Last publish

Collaborators

  • jaredwray