Documentation ¶
Overview ¶
Package prefixstore provides a store that prefixes all keys with a given prefix. It is used to isolate storage reads and writes for an account. Implementation taken from cosmossdk.io/store/prefix, and adapted to the cosmossdk.io/core/store.KVStore interface.
Index ¶
- func New(store store.KVStore, prefix []byte) store.KVStore
- type Store
- func (s Store) Delete(key []byte) error
- func (s Store) Get(key []byte) ([]byte, error)
- func (s Store) Has(key []byte) (bool, error)
- func (s Store) Iterator(start, end []byte) (store.Iterator, error)
- func (s Store) ReverseIterator(start, end []byte) (store.Iterator, error)
- func (s Store) Set(key, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is similar with cometbft/cometbft-db/blob/v1.0.1/prefixdb.go both gives access only to the limited subset of the store for convenience or safety
func (Store) Iterator ¶
Implements KVStore Check https://github.com/cometbft/cometbft-db/blob/v1.0.1/prefixdb.go#L109
func (Store) ReverseIterator ¶
ReverseIterator implements KVStore Check https://github.com/cometbft/cometbft-db/blob/v1.0.1/prefixdb.go#L132
Click to show internal directories.
Click to hide internal directories.