Skip to content

An adapter that implements the hyper Cache Port using SQLite

Notifications You must be signed in to change notification settings

hyper63/hyper-adapter-sqlite

Repository files navigation

hyper-adapter-sqlite

A cache adapter for hyper

Nest Badge Test Current Version


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

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

deps.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 adapter

See the full port here

Contributing

Contributions are welcome! See the hyper contribution guide

Testing

./scripts/test.sh

To lint, check formatting, and run unit tests

License

Apache-2.0