gorocksdb
gorocksdb copied to clipboard
WriteBatch.Close
The docs say:
Batched, atomic writes can be performed with a WriteBatch and DB.Write.
wb := gorocksdb.NewWriteBatch()
// defer wb.Close or use wb.Clear and reuse.
wb.Delete([]byte("foo"))
wb.Put([]byte("foo"), []byte("bar"))
wb.Put([]byte("bar"), []byte("foo"))
err := db.Write(wo, wb)
However, there is no Close
method on the WriteBatch
type. Is this method missing or is the documentation wrong?
You should try WriteBatch.Destroy.