aboutsummaryrefslogtreecommitdiff
path: root/bucket.go
blob: b1c1cc0cec09a62af10739e1d0a665bd843588f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package bolt

type Bucket struct {
	*bucket
	name        string
	transaction *Transaction
}

type bucket struct {
	root pgid
}

// Name returns the name of the bucket.
func (b *Bucket) Name() string {
	return b.name
}

// cursor creates a new cursor for this bucket.
func (b *Bucket) cursor() *Cursor {
	return &Cursor{
		transaction: b.transaction,
		root:        b.root,
		stack:       make([]elem, 0),
	}
}