MarcelloDB icon indicating copy to clipboard operation
MarcelloDB copied to clipboard

is there a way to delete an entire collection without having to iterate all the keys on it?

Open egarim opened this issue 7 years ago • 2 comments

is there a way to delete an entire collection without having to iterate all the keys on it?

egarim avatar Dec 28 '17 10:12 egarim

Hi Jose,

If you look at the folder where the data is stored, you will see a file with the exact name as the name you specified when creating the collectionFile. If you have no open sessions, it is save to delete the file, make sure you delete the journal file too. When this file is gone, your collection will be empty.

This will of course delete all collection in the collection file. If you want to delete a single collection without deleting other collection in the same file, there is currently no other way than loading all ids in memory, iterating them and deleting them one by one.

This is also on the roadmap to be implemented.

markmeeus avatar Jan 18 '18 17:01 markmeeus

Thanks Mark I will test this feature when is implemented.

egarim avatar Jan 23 '18 09:01 egarim