func (l *LevelDBPersistence) Get(value coding.Encoder) (b []byte, err error) { key, err := value.Encode() if err != nil { return } return l.storage.Get(l.readOptions, key) }
func (l *LevelDBPersistence) Drop(value coding.Encoder) (err error) { key, err := value.Encode() if err != nil { return } err = l.storage.Delete(l.writeOptions, key) return }
func (l *LevelDBPersistence) Put(key, value coding.Encoder) (err error) { keyEncoded, err := key.Encode() if err != nil { return } valueEncoded, err := value.Encode() if err != nil { return } err = l.storage.Put(l.writeOptions, keyEncoded, valueEncoded) return }