func (s *store) Append(key, value []byte) error { old, err := s.Get(key) if err != nil { return err } v, write, err := db.Upd(key, value, old) if err != nil { return err } if write { return s.Set(key, v) } return nil }
func (b *batch) Append(key, value []byte) error { old, err := b.s.Get(key) if err != nil { return err } v, write, err := db.Upd(key, value, old) if err != nil { return err } if write { b.bn.Put(key, v) } return nil }