mafintosh / mafintosh/hyperdb

Pluggable adapter/encoder api [feature idea]

Open
#157 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
748
Forks
56
PR merge metrics
No merged PRs in 30d

Description

This is more a feature request / proposal... it would be nice if there was neat way to apply a transformation on incoming and outgoing data.

```js
var hyperdb = require('hyperdb')

var db = hyperdb()

// pass through
db.setEncoder(function (input) { return input })
db.setDecoder(function (input) { return input })

```
The idea is that those functions are called before any data is inserted or retrieved (before the data is returned from streams and callbacks).

There may already be a nice way to do this stuff, and the API is just a proposal at this stage. All comments and thoughts welcome!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing hyperdb's existing data insertion and retrieval paths, including streams and callbacks, to determine whether transformation hooks already exist. Compare those paths with the proposed setEncoder and setDecoder API; done would mean an agreed design for applying transformations consistently before insertion and before returned data.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
database, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.