MCPcopy
hub / github.com/etcd-io/bbolt / Bucket

Method Bucket

tx.go:111–113  ·  view source on GitHub ↗

Bucket retrieves a bucket by name. Returns nil if the bucket does not exist. The bucket instance is only valid for the lifetime of the transaction.

(name []byte)

Source from the content-addressed store, hash-verified

109// Returns nil if the bucket does not exist.
110// The bucket instance is only valid for the lifetime of the transaction.
111func (tx *Tx) Bucket(name []byte) *Bucket {
112 return tx.root.Bucket(name)
113}
114
115// CreateBucket creates a new bucket.
116// Returns an error if the bucket already exists, if the bucket name is blank, or if the bucket name is too long.

Callers 15

cloneBucketFunction · 0.45
TestCursor_BucketFunction · 0.45
TestCursor_SeekFunction · 0.45
TestCursor_DeleteFunction · 0.45
TestCursor_Seek_LargeFunction · 0.45
TestCursor_EmptyBucketFunction · 0.45
TestCursor_Iterate_LeafFunction · 0.45
TestCursor_RestartFunction · 0.45

Calls

no outgoing calls

Tested by 15

cloneBucketFunction · 0.36
TestCursor_BucketFunction · 0.36
TestCursor_SeekFunction · 0.36
TestCursor_DeleteFunction · 0.36
TestCursor_Seek_LargeFunction · 0.36
TestCursor_EmptyBucketFunction · 0.36
TestCursor_Iterate_LeafFunction · 0.36
TestCursor_RestartFunction · 0.36