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

Method SyncDelete

driver/hybriddb/db.go:255–271  ·  view source on GitHub ↗
(key []byte)

Source from the content-addressed store, hash-verified

253}
254
255func (db *DB) SyncDelete(key []byte) error {
256 db.mu.Lock()
257 defer db.mu.Unlock()
258
259 if db.closed {
260 return fmt.Errorf("database is closed")
261 }
262
263 if len(key) == 0 {
264 db.stats.Errors++
265 return fmt.Errorf("key cannot be empty")
266 }
267
268 db.stats.DeleteOps++
269
270 return db.db.Delete(key, db.syncOpts)
271}
272
273func (db *DB) NewWriteBatch() driver.IWriteBatch {
274 wb := &WriteBatch{

Callers 1

TestDB_SyncOperationsFunction · 0.45

Calls 1

DeleteMethod · 0.45

Tested by 1

TestDB_SyncOperationsFunction · 0.36