MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / Close

Method Close

driver/ipfs-log/db.go:137–145  ·  view source on GitHub ↗

Close closes the database instances

()

Source from the content-addressed store, hash-verified

135
136// Close closes the database instances
137func (db *DB) Close() error {
138 // Close the leveldb instance
139 if err := db.leveldb.Close(); err != nil {
140 return fmt.Errorf("failed to close leveldb: %w", err)
141 }
142 // Close the LevelKVDB instance (assuming it doesn't return an error)
143 db.db.Close()
144 return nil
145}
146
147// Put inserts a key-value pair into the database
148func (db *DB) Put(key, value []byte) error {

Callers

nothing calls this directly

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected