https://github.com/hyper63/hyper-adapter-sqlite
An adapter that implements the hyper Cache Port using SQLite
https://github.com/hyper63/hyper-adapter-sqlite
Last synced: about 1 year ago
JSON representation
An adapter that implements the hyper Cache Port using SQLite
- Host: GitHub
- URL: https://github.com/hyper63/hyper-adapter-sqlite
- Owner: hyper63
- Created: 2021-09-04T17:39:46.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-11-29T00:54:10.000Z (over 2 years ago)
- Last Synced: 2025-01-13T05:41:38.688Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 210 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
hyper-adapter-sqlite
A cache adapter for hyper
---
- [Installation](#installation)
- [Features](#features)
- [Methods](#methods)
- [Contributing](#contributing)
- [Testing](#testing)
- [License](#license)
Welcome to the sqlite hyper adapter for the cache port, a cache allows you to store key,value pairs
where the key is a unique string and the value is a JSON document. Using this simple pattern, you
can store highly accessible data for lighting fast reading.
Add the cache adapter to your hyper config
```js
import { default as sqlite } from 'https://x.nest.land/hyper-adapter-sqlite/mod.js'
export default {
app: opine,
adapter: [
{
port: 'cache',
plugins: [sqlite({ dir: '/tmp' })],
},
],
}
```
## Installation
This is a Deno module available to import from
[nest.land](https://nest.land/package/hyper-adapter-sqlite)
deps.js
```js
export { default as sqlite } from 'https://x.nest.land/hyper-adapter-sqlite/mod.js'
```
## Features
- Create a named store in `sqlite`
- Destroy a named store in `sqlite`
- Create a document in a store in `sqlite`
- Get a document from a store in `sqlite`
- Update a document in a store in `sqlite`
- Delete a document from a store in `sqlite`
- List documents in a sttore in `sqlite`
## Methods
This adapter fully implements the Cache port and can be used as the
[hyper Cache service](https://docs.hyper.io/cache-api) adapter
See the full port [here](https://nest.land/package/hyper-port-cache)
## Contributing
Contributions are welcome! See the hyper
[contribution guide](https://docs.hyper.io/contributing-to-hyper)
## Testing
```
./scripts/test.sh
```
To lint, check formatting, and run unit tests
## License
Apache-2.0