diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-15 23:38:03 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-15 23:38:03 -0700 |
commit | 0bf796c9deeb19564bcd7fc5ded57031fe7ceb57 (patch) | |
tree | 00359a50db7088ddf23af3c863fc5fc99fc3d142 /transaction.go | |
parent | Fix DB.opened flag. (diff) | |
download | dedo-0bf796c9deeb19564bcd7fc5ded57031fe7ceb57.tar.gz dedo-0bf796c9deeb19564bcd7fc5ded57031fe7ceb57.tar.xz |
Improve test coverage.
Diffstat (limited to 'transaction.go')
-rw-r--r-- | transaction.go | 8 |
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. |