Documentation
¶
Index ¶
- func DecodeVersionAndMetadata(encodedstr string) (*version.Height, []byte, error)
- type SysState
- type VersionedDB
- func (v *VersionedDB) ApplyUpdates(updates *statedb.UpdateBatch, height *version.Height) error
- func (v *VersionedDB) BytesKeySupported() bool
- func (v *VersionedDB) Close()
- func (v *VersionedDB) ExecuteConditionQuery(namespace string, search entitydefinition.Search) (interface{}, error)
- func (v *VersionedDB) ExecuteQuery(namespace, query string) (statedb.ResultsIterator, error)
- func (v *VersionedDB) ExecuteQueryWithMetadata(namespace, query string, metadata map[string]interface{}) (statedb.QueryResultsIterator, error)
- func (v *VersionedDB) GetLatestSavePoint() (*version.Height, error)
- func (v *VersionedDB) GetState(namespace string, key string) (*statedb.VersionedValue, error)
- func (v *VersionedDB) GetStateMultipleKeys(namespace string, keys []string) ([]*statedb.VersionedValue, error)
- func (v *VersionedDB) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (statedb.ResultsIterator, error)
- func (v *VersionedDB) GetStateRangeScanIteratorWithMetadata(namespace string, startKey string, endKey string, ...) (statedb.QueryResultsIterator, error)
- func (v *VersionedDB) GetVersion(namespace string, key string) (*version.Height, error)
- func (v *VersionedDB) Open() error
- func (v *VersionedDB) ValidateKeyValue(key string, value []byte) error
- type VersionedDBProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type VersionedDB ¶
type VersionedDB struct {
// contains filtered or unexported fields
}
VersionedDB implements VersionedDB interface
func (*VersionedDB) ApplyUpdates ¶
func (v *VersionedDB) ApplyUpdates(updates *statedb.UpdateBatch, height *version.Height) error
ApplyUpdates implements method in VersionedDB interface
func (*VersionedDB) BytesKeySupported ¶
func (v *VersionedDB) BytesKeySupported() bool
func (*VersionedDB) Close ¶
func (v *VersionedDB) Close()
func (*VersionedDB) ExecuteConditionQuery ¶
func (v *VersionedDB) ExecuteConditionQuery(namespace string, search entitydefinition.Search) (interface{}, error)
func (*VersionedDB) ExecuteQuery ¶
func (v *VersionedDB) ExecuteQuery(namespace, query string) (statedb.ResultsIterator, error)
ExecuteQuery implements method in VersionedDB interface
func (*VersionedDB) ExecuteQueryWithMetadata ¶
func (v *VersionedDB) ExecuteQueryWithMetadata(namespace, query string, metadata map[string]interface{}) (statedb.QueryResultsIterator, error)
ExecuteQueryWithMetadata implements method in VersionedDB interface
func (*VersionedDB) GetLatestSavePoint ¶
func (v *VersionedDB) GetLatestSavePoint() (*version.Height, error)
func (*VersionedDB) GetState ¶
func (v *VersionedDB) GetState(namespace string, key string) (*statedb.VersionedValue, error)
GetState implements method in VersionedDB interface
func (*VersionedDB) GetStateMultipleKeys ¶
func (v *VersionedDB) GetStateMultipleKeys(namespace string, keys []string) ([]*statedb.VersionedValue, error)
GetStateMultipleKeys implements method in VersionedDB interface
func (*VersionedDB) GetStateRangeScanIterator ¶
func (v *VersionedDB) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (statedb.ResultsIterator, error)
GetStateRangeScanIterator implements method in VersionedDB interface
func (*VersionedDB) GetStateRangeScanIteratorWithMetadata ¶
func (v *VersionedDB) GetStateRangeScanIteratorWithMetadata(namespace string, startKey string, endKey string, metadata map[string]interface{}) (statedb.QueryResultsIterator, error)
GetStateRangeScanIteratorWithMetadata implements method in VersionedDB interface
func (*VersionedDB) GetVersion ¶
GetVersion implements method in VersionedDB interface
func (*VersionedDB) Open ¶
func (v *VersionedDB) Open() error
func (*VersionedDB) ValidateKeyValue ¶
func (v *VersionedDB) ValidateKeyValue(key string, value []byte) error
type VersionedDBProvider ¶
type VersionedDBProvider struct {
// contains filtered or unexported fields
}
VersionedDBProvider implements interface VersionedDBProvider
func NewVersionedDBProvider ¶
func NewVersionedDBProvider(config *ormdbconfig.ORMDBConfig, metricsProvider metrics.Provider, cache *statedb.Cache) (*VersionedDBProvider, error)
NewVersionedDBProvider instantiates VersionedDBProvider
func (*VersionedDBProvider) Close ¶
func (provider *VersionedDBProvider) Close()
Close closes the underlying db instance
func (*VersionedDBProvider) GetDBHandle ¶
func (provider *VersionedDBProvider) GetDBHandle(dbName string) (statedb.VersionedDB, error)
GetDBHandle gets the handle to a named database