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

Method Close

internal/btesting/btesting.go:90–104  ·  view source on GitHub ↗

Close closes the database but does NOT delete the underlying file.

()

Source from the content-addressed store, hash-verified

88
89// Close closes the database but does NOT delete the underlying file.
90func (db *DB) Close() error {
91 if db.DB != nil {
92 // Log statistics.
93 if *statsFlag {
94 db.PrintStats()
95 }
96 db.t.Logf("Closing bbolt DB at: %s", db.f)
97 err := db.DB.Close()
98 if err != nil {
99 return err
100 }
101 db.DB = nil
102 }
103 return nil
104}
105
106// MustClose closes the database but does NOT delete the underlying file.
107func (db *DB) MustClose() {

Callers 12

MustCloseMethod · 0.95
ReadPageFunction · 0.45
WritePageFunction · 0.45
ReadPageAndHWMSizeFunction · 0.45
TestRevertMetaPageFunction · 0.45
TestFindPathsToKeyFunction · 0.45
CopyFileFunction · 0.45

Calls 1

PrintStatsMethod · 0.95