Closed shah closed 6 years ago
The easiest and best way is to implement this at the application layer.
key=foo value={"data":{...}}
key=bar value={"ref":"foo"}
key=baz value={"ref":"foo"}
Great idea @peterbourgon that should work. Thanks!
@peterbourgon what's the best way to accomplish value 'aliases' or 'links' using multiple keys pointing to the same value? For example, I have a JSON file to store, it has a canonical name (the 'key'). Then, I might have several other aliases or keys, e.g. tags, that I would like to use to lookup the same value (meaning I could use the primary key or any number of secondary keys).
I was thinking this could be implemented using file systems symlinks for the secondary keys but wasn't sure how to support that in diskv. Thoughts?
This is a great library by the way, I love the idea of a KV store with a simple way to get access to the files. Excellent idea.