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

Function mustGetBucketRootPage

tx_check_test.go:205–215  ·  view source on GitHub ↗

mustGetBucketRootPage returns the root page for the provided bucket.

(t testing.TB, db *bbolt.DB, bucketName []byte)

Source from the content-addressed store, hash-verified

203
204// mustGetBucketRootPage returns the root page for the provided bucket.
205func mustGetBucketRootPage(t testing.TB, db *bbolt.DB, bucketName []byte) common.Pgid {
206 var rootPageId common.Pgid
207 _ = db.View(func(tx *bbolt.Tx) error {
208 b := tx.Bucket(bucketName)
209 require.NotNil(t, b)
210 rootPageId = b.RootPage()
211 return nil
212 })
213
214 return rootPageId
215}

Callers 3

corruptRootPageFunction · 0.85

Calls 3

ViewMethod · 0.80
RootPageMethod · 0.80
BucketMethod · 0.45

Tested by

no test coverage detected