func (tx *Tx) DeleteBucket(name []byte) error {
	err := tx.Tx.DeleteBucket(name)
	if err != nil {
		return err
	}
	if !tx.writable {
		return nil
	}
	n := cpb(name)
	tx.log(OpDeleteBucket, [][]byte{n}, nil, 0)
	return nil
}
/*
We don't need to record Tx's Cursor sessions, as Cursor.Delete() can't delete buckets.
func (tx *Tx) Cursor() *Cursor
package rbolt
import "github.com/boltdb/bolt"
func RTx(tx *bolt.Tx) *Tx {
	return &Tx{Tx: tx, writable: tx.Writable(), j: &Journal{TxID: tx.ID(), Type: JournalTypeUpdate}}
}
type Tx struct {
	*bolt.Tx
	writable bool
	j        *Journal
}
func (tx *Tx) Journal() *Journal {
	return tx.j
}
func (tx *Tx) log(op Op, path [][]byte, v []byte, cursorID int) {
	tx.j.Ws = append(tx.j.Ws, W{Op: op, Path: path, Value: v, CursorID: cursorID})
}
func (tx *Tx) Bucket(name []byte) *Bucket {
	b := tx.Tx.Bucket(name)
	if b == nil {
		return nil
	}
	if !tx.writable {
		return &Bucket{b: b, tx: tx}
	}
	n := cpb(name)
	return &Bucket{b: b, tx: tx, path: [][]byte{n}}
}
func (tx *Tx) CreateBucket(name []byte) (*Bucket, error) {
	b, err := tx.Tx.CreateBucket(name)
	if err != nil {
		return nil, err
	}
	if !tx.writable {
		return &Bucket{b: b, tx: tx}, nil
	}
	n := cpb(name)
	tx.log(OpCreateBucket, [][]byte{n}, nil, 0)
	return &Bucket{b: b, tx: tx, path: [][]byte{n}}, nil
}
func (tx *Tx) CreateBucketIfNotExists(name []byte) (*Bucket, error) {
	b, err := tx.Tx.CreateBucketIfNotExists(name)
	if err != nil {
		return nil, err
	}
	if !tx.writable {
		return &Bucket{b: b, tx: tx}, nil
	}
	n := cpb(name)
	tx.log(OpCreateBucketIfNotExists, [][]byte{n}, nil, 0)
	return &Bucket{b: b, tx: tx, path: [][]byte{n}}, nil
}