aboutsummaryrefslogtreecommitdiff
path: root/transaction.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-02-15 23:38:03 -0700
committerBen Johnson <benbjohnson@yahoo.com>2014-02-15 23:38:03 -0700
commit0bf796c9deeb19564bcd7fc5ded57031fe7ceb57 (patch)
tree00359a50db7088ddf23af3c863fc5fc99fc3d142 /transaction.go
parentFix DB.opened flag. (diff)
downloaddedo-0bf796c9deeb19564bcd7fc5ded57031fe7ceb57.tar.gz
dedo-0bf796c9deeb19564bcd7fc5ded57031fe7ceb57.tar.xz
Improve test coverage.
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.