示例#1
0
文件: set.go 项目: fengshao0907/rpdb
func (o *setRow) deleteObject(b *Rpdb, bt *store.Batch) error {
	it := b.getIterator()
	defer b.putIterator(it)
	for pfx := it.SeekTo(o.DataKeyPrefix()); it.Valid(); it.Next() {
		key := it.Key()
		if !bytes.HasPrefix(key, pfx) {
			break
		}
		bt.Del(key)
	}
	bt.Del(o.MetaKey())
	return it.Error()
}
示例#2
0
func (o *stringRow) deleteObject(b *Rpdb, bt *store.Batch) error {
	bt.Del(o.DataKey())
	bt.Del(o.MetaKey())
	return nil
}