aboutsummaryrefslogtreecommitdiff
path: root/rwtransaction.go
diff options
context:
space:
mode:
Diffstat (limited to 'rwtransaction.go')
-rw-r--r--rwtransaction.go23
1 files changed, 1 insertions, 22 deletions
diff --git a/rwtransaction.go b/rwtransaction.go
index b88e2c8..d9097f3 100644
--- a/rwtransaction.go
+++ b/rwtransaction.go
@@ -18,34 +18,13 @@ type RWTransaction struct {
// init initializes the transaction.
func (t *RWTransaction) init(db *DB) {
t.Transaction.init(db)
+ t.Transaction.rwtransaction = t
t.pages = make(map[pgid]*page)
// Increment the transaction id.
t.meta.txnid += txnid(1)
}
-// Bucket retrieves a writable bucket by name.
-// Returns nil if the bucket does not exist.
-func (t *RWTransaction) Bucket(name string) *Bucket {
- b := t.Transaction.Bucket(name)
- if b == nil {
- return nil
- }
-
- b.rwtransaction = t
- return b
-}
-
-// Buckets retrieves a list of all buckets.
-// All returned buckets are writable.
-func (t *RWTransaction) Buckets() []*Bucket {
- buckets := t.Transaction.Buckets()
- for _, b := range buckets {
- b.rwtransaction = t
- }
- return buckets
-}
-
// CreateBucket creates a new bucket.
// Returns an error if the bucket already exists, if the bucket name is blank, or if the bucket name is too long.
func (t *RWTransaction) CreateBucket(name string) error {