pjtatlow / jammdb

Just Another Memory Mapped Database
Apache License 2.0
273 stars 21 forks source link

[question] Is there way to list all the buckets #7

Closed ArunGust closed 3 years ago

ArunGust commented 3 years ago

Hi,

Is there any way to list all the buckets in DB.

pjtatlow commented 3 years ago

Hmm, you can iterate over the items inside a bucket, so if you nest all of your buckets inside of another one, you could iterate over them that way.

Technically I don't see any reason to not allow listing all of the top level buckets, I just haven't done it yet! Let me see if it's something I can add quickly though, I do see that being a useful thing to have!

ArunGust commented 3 years ago

thank you. I thought it might help to manage buckets. DB crashed for some reason, is there any log file ?

pjtatlow commented 3 years ago

No, and I'm not sure it makes sense to have one. Since only your program runs it, your program should have been the one to catch the "crash". What happened specifically?

ArunGust commented 3 years ago

ok, thanks, for now, I just rebuild the DB. I am still in the early stages

pjtatlow commented 3 years ago

Sounds good, if you can figure out any repro steps let me know!

Also, I've just released version 0.5.0 which should give you the buckets method on a transaction or the sub_buckets method on any bucket