mjp0 / datagram-node

📡 Datagram is an open-source data platform that you can use to build secured & shareable p2p databases with anyone.
https://datagramjs.com
Apache License 2.0
1 stars 0 forks source link

Implement index #44

Open mjp0 opened 5 years ago

mjp0 commented 5 years ago

At the moment if you want to get the list of data you have in your datagram, you need to download everything in the datagram, and then get the data names. This works when you are running local datagrams but fails when you just want to see inside a remote datagram.

This can be solved by creating an index array to each datagram at key _index. Every time new data is stored, its key is appended into _index. Then list method can be refactored to fetch only _index key.


Deliverables