AKASHAorg / secure-webstore

A secure IndexedDB store with built-in encryption
MIT License
44 stars 6 forks source link

get all the records stored in the store #10

Closed VamsiKrishnaMyneni closed 3 years ago

VamsiKrishnaMyneni commented 3 years ago

Hi, how can i get all the records stored the object store in a single go. ex: in plain javascript terms getAll() will give me all the records stored in the objectstore in a single go

deiu commented 3 years ago

Are you looking for something like https://github.com/AKASHAorg/secure-webstore#export?

VamsiKrishnaMyneni commented 3 years ago

hi deiu, i am looking for some thing const val = await store.getAll(); so it will give me the all the data stored in the object store in unencrypted format ex: val = [{val: 'ab'}, {val: 'bc'}]

deiu commented 3 years ago

I see. Well, the closest thing you can do is to get a list of keys and then do a series of gets on them.

const keys = await store.keys()
console.log(keys)
// logs: ["hello", "foo"]
deiu commented 3 years ago

Closing this issue due to inactivity.