Documentation
¶
Index ¶
- func StoreConstructor(db dbm.DB, opts types.StoreOptions) types.CommitStore
- type Store
- func (dsa Store) CacheWrap() types.Store
- func (dsa Store) Commit() types.CommitID
- func (dsa Store) Delete(gctx *types.GasContext, key []byte)
- func (dsa Store) Get(gctx *types.GasContext, key []byte) []byte
- func (dsa Store) GetDB() dbm.DB
- func (dsa Store) GetStoreOptions() types.StoreOptions
- func (dsa Store) Has(gctx *types.GasContext, key []byte) bool
- func (dsa Store) Iterator(gctx *types.GasContext, start, end []byte) types.Iterator
- func (dsa Store) LastCommitID() types.CommitID
- func (dsa Store) LoadLatestVersion() error
- func (dsa Store) LoadVersion(ver int64) error
- func (dsa Store) ReverseIterator(gctx *types.GasContext, start, end []byte) types.Iterator
- func (dsa Store) Set(gctx *types.GasContext, key, value []byte)
- func (dsa Store) SetStoreOptions(types.StoreOptions)
- func (dsa Store) Write()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StoreConstructor ¶
func StoreConstructor(db dbm.DB, opts types.StoreOptions) types.CommitStore
Implements CommitStoreConstructor.
Types ¶
type Store ¶
Wrapper type for dbm.Db with implementation of Store
func (Store) Delete ¶
func (dsa Store) Delete(gctx *types.GasContext, key []byte)
Delete deletes the key. Panics on nil key.
func (Store) Get ¶
func (dsa Store) Get(gctx *types.GasContext, key []byte) []byte
Get returns nil iff key doesn't exist. Panics on nil key.
func (Store) GetStoreOptions ¶
func (dsa Store) GetStoreOptions() types.StoreOptions
Implements Committer/CommitStore.
func (Store) Has ¶
func (dsa Store) Has(gctx *types.GasContext, key []byte) bool
Has checks if a key exists. Panics on nil key.
func (Store) Iterator ¶
Iterator over a domain of keys in ascending order.
Does not charge gas. Gas is charged by cache.Store, which wraps this store on gas-metered production paths.
func (Store) LastCommitID ¶
Implements Committer/CommitStore.
func (Store) LoadLatestVersion ¶
Implements Committer/CommitStore.
func (Store) LoadVersion ¶
Implements Committer/CommitStore.
func (Store) ReverseIterator ¶
Iterator over a domain of keys in descending order.
Does not charge gas. See Iterator.
func (Store) Set ¶
func (dsa Store) Set(gctx *types.GasContext, key, value []byte)
Set sets the key. Panics on nil key or value.
func (Store) SetStoreOptions ¶
func (dsa Store) SetStoreOptions(types.StoreOptions)
Implements Committer/CommitStore.