Add a new datastore to orbit-db: Document Store.
Original discussion here: https://github.com/haadcode/orbit-db/issues/35
I can work on this
Excellent! Let's go through today what needs to be done.
Consider this claimed by @shamb0t
API idea:
const store = orbitdb.documents('db name', { indexBy: 'title' })
store.put({ title: 'hello world', doc: 'all the things'})
store.get('hello world') // return the object ^
And we might want to extend that to have a simple search:
store.search({ doc: 'things'}) // return the document in the example above
This is purely optional for now.
@shamb0t Any progress on this? Do you still plan to work on this? If not, let me know and I'll move the task back to the Backlog (instead of "this will be worked on soon").
@haadcode just for exact title matches so far
Published to npm as version 0.13.0, https://github.com/haadcode/orbit-db/commit/625748e68bf7164a9fa54dd8fb2aa1a8d4f442a2.
Documentation here: https://github.com/haadcode/orbit-db/blob/master/API.md#docstorename-options, the package repo is here: https://github.com/shamb0t/orbit-db-docstore.
<3
o/
Thank you @shamb0t for implementing this, great work and a great new feature for orbit-db! o/
馃帀 馃挜