aboutsummaryrefslogtreecommitdiff
path: root/transaction.go
diff options
context:
space:
mode:
Diffstat (limited to 'transaction.go')
-rw-r--r--transaction.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/transaction.go b/transaction.go
index 46adefe..739d112 100644
--- a/transaction.go
+++ b/transaction.go
@@ -63,8 +63,12 @@ func (t *Transaction) Bucket(name string) *Bucket {
// Buckets retrieves a list of all buckets.
func (t *Transaction) Buckets() []*Bucket {
- warn("[pending] Transaction.Buckets()") // TODO
- return nil
+ buckets := make([]*Bucket, 0, len(t.buckets.items))
+ for name, b := range t.buckets.items {
+ bucket := &Bucket{bucket: b, transaction: t, name: name}
+ buckets = append(buckets, bucket)
+ }
+ return buckets
}
// Cursor creates a cursor associated with a given bucket.