Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to get all the keys from bucket using storm toolkit? #239

Open
eschizoid opened this issue Nov 29, 2018 · 3 comments
Open
Labels

Comments

@eschizoid
Copy link

eschizoid commented Nov 29, 2018

I would like to get all the the elements of a bucket without knowing the key.

Something like the following:

https://github.com/bobintornado/boltdb-boilerplate/blob/master/boilerplate.go#L91

@asdine
Copy link
Owner

asdine commented Dec 22, 2018

@eschizoid
Copy link
Author

eschizoid commented Dec 31, 2018

That feature appears not to be working for buckets. I ended up doing something like the following :(

for _, key := range keys {
    var item AnyItem
    err := db.Get("test_bucket", key, &item)
    list := append(list, item)
}

@sh0umik
Copy link

sh0umik commented Nov 6, 2019

Yes there is not All form Bucket its confusing . If I use Get and Set it requires a bucket name . So All method should have a bucket name. Or another Method like AllFromBucket is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants