https://github.com/huijiewei/keyv-sqlite
A new SQLite storage adapter for Keyv.
https://github.com/huijiewei/keyv-sqlite
better-sqlite3 keyv sqlite3
Last synced: 8 months ago
JSON representation
A new SQLite storage adapter for Keyv.
- Host: GitHub
- URL: https://github.com/huijiewei/keyv-sqlite
- Owner: huijiewei
- License: mit
- Created: 2024-11-11T07:19:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-11T07:23:08.000Z (over 1 year ago)
- Last Synced: 2025-10-09T17:15:42.207Z (8 months ago)
- Topics: better-sqlite3, keyv, sqlite3
- Language: TypeScript
- Homepage:
- Size: 43 KB
- Stars: 3
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SQLite store for keyv
A new SQLite cache store for [keyv](https://github.com/jaredwray/keyv).
## Featuring:
- using [better-sqlite3](https://github.com/WiseLibs/better-sqlite3)
- 100% test coverage and production ready
## Installation
```
npm i @resolid/keyv-sqlite
```
## Requirements
- SQLite 3 with [better-sqlite3](https://github.com/WiseLibs/better-sqlite3)
- Node 18+
## Usage
```js
import { KeyvSqlite } from '@resolid/keyv-sqlite';
import Keyv from "keyv";
import { join } from 'node:path';
// SQLite :memory: cache store
const keyv = new Keyv(new KeyvSqlite());
// On disk cache on caches table
const keyv = new Keyv(new KeyvSqlite({uri: join(process.cwd(), 'cache.sqlite3')}));
```
## License
[MIT](./LICENSE).
## Thanks
Thanks to JetBrains for the [OSS development license](https://jb.gg/OpenSourceSupport).
