Documentation ¶
Index ¶
- type TestDBEnv
- type VersionedDB
- func (vdb VersionedDB) ApplyUpdates(batch *statedb.UpdateBatch, height *version.Height) error
- func (vdb *VersionedDB) BytesKeySuppoted() bool
- func (vdb *VersionedDB) Close()
- func (vdb *VersionedDB) ExecuteQuery(namespace, queryOrPaingStr string) (statedb.ResultsIterator, error)
- func (vdb *VersionedDB) ExecuteQueryWithMetadata(namespace, query string, metadata map[string]interface{}) (statedb.QueryResultsIterator, error)
- func (vdb *VersionedDB) GetDBType() string
- func (vdb *VersionedDB) GetLatestSavePoint() (*version.Height, error)
- func (vdb *VersionedDB) GetState(namespace string, key string) (*statedb.VersionedValue, error)
- func (vdb *VersionedDB) GetStateMultipleKeys(namespace string, keys []string) ([]*statedb.VersionedValue, error)
- func (vdb *VersionedDB) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (statedb.ResultsIterator, error)
- func (vdb *VersionedDB) GetStateRangeScanIteratorWithMetadata(namespace string, startKey string, endKey string, ...) (statedb.QueryResultsIterator, error)
- func (vdb *VersionedDB) GetVersion(namespace string, key string) (*version.Height, error)
- func (vdb *VersionedDB) JsonQuery(namespace, query string) (statedb.ResultsIterator, error)
- func (vdb *VersionedDB) Open() error
- func (vdb *VersionedDB) PagingQuery(namespace string, pagingOrQuery *mongodbhelper.PagingOrQuery) (statedb.ResultsIterator, error)
- func (vdb *VersionedDB) ProcessIndexesForChaincodeDeploy(namespace string, fileEntries []*ccprovider.TarFileEntry) error
- func (vdb *VersionedDB) ValidateKey(key string) error
- func (vdb *VersionedDB) ValidateKeyValue(key string, value []byte) error
- type VersionedDBProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestDBEnv ¶
type TestDBEnv struct { DBProvider statedb.VersionedDBProvider // contains filtered or unexported fields }
func NewTestDBEnv ¶
type VersionedDB ¶
type VersionedDB struct {
// contains filtered or unexported fields
}
func (VersionedDB) ApplyUpdates ¶
func (vdb VersionedDB) ApplyUpdates(batch *statedb.UpdateBatch, height *version.Height) error
ApplyUpdates implements method in VersionedDB interface
func (*VersionedDB) BytesKeySuppoted ¶
func (vdb *VersionedDB) BytesKeySuppoted() bool
BytesKeySuppoted implements method in VersionedDB interface
func (*VersionedDB) Close ¶
func (vdb *VersionedDB) Close()
Close implements method in VersionedDB interface
func (*VersionedDB) ExecuteQuery ¶
func (vdb *VersionedDB) ExecuteQuery(namespace, queryOrPaingStr string) (statedb.ResultsIterator, error)
ExecuteQuery implements method in VersionedDB interface
func (*VersionedDB) ExecuteQueryWithMetadata ¶
func (vdb *VersionedDB) ExecuteQueryWithMetadata(namespace, query string, metadata map[string]interface{}) (statedb.QueryResultsIterator, error)
TODO ExecuteQueryWithMetadata implements method in VersionedDB interface
func (*VersionedDB) GetDBType ¶
func (vdb *VersionedDB) GetDBType() string
func (*VersionedDB) GetLatestSavePoint ¶
func (vdb *VersionedDB) GetLatestSavePoint() (*version.Height, error)
GetLatestSavePoint implements method in VersionedDB interface
func (*VersionedDB) GetState ¶
func (vdb *VersionedDB) GetState(namespace string, key string) (*statedb.VersionedValue, error)
GetState implements method in VersionedDB interface
func (*VersionedDB) GetStateMultipleKeys ¶
func (vdb *VersionedDB) GetStateMultipleKeys(namespace string, keys []string) ([]*statedb.VersionedValue, error)
GetStateMultipleKeys implements method in VersionedDB interface
func (*VersionedDB) GetStateRangeScanIterator ¶
func (vdb *VersionedDB) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (statedb.ResultsIterator, error)
GetStateRangeScanIterator implements method in VersionedDB interface startKey is inclusive endKey is exclusive
func (*VersionedDB) GetStateRangeScanIteratorWithMetadata ¶
func (vdb *VersionedDB) GetStateRangeScanIteratorWithMetadata(namespace string, startKey string, endKey string, metadata map[string]interface{}) (statedb.QueryResultsIterator, error)
TODO GetStateRangeScanIteratorWithMetadata implements method in VersionedDB interface
func (*VersionedDB) GetVersion ¶
GetVersion implements method in VersionedDB interface TODO support GetVersion
func (*VersionedDB) JsonQuery ¶
func (vdb *VersionedDB) JsonQuery(namespace, query string) (statedb.ResultsIterator, error)
func (*VersionedDB) Open ¶
func (vdb *VersionedDB) Open() error
Open implements method in VersionedDB interface
func (*VersionedDB) PagingQuery ¶
func (vdb *VersionedDB) PagingQuery(namespace string, pagingOrQuery *mongodbhelper.PagingOrQuery) (statedb.ResultsIterator, error)
return paging result of json query
func (*VersionedDB) ProcessIndexesForChaincodeDeploy ¶
func (vdb *VersionedDB) ProcessIndexesForChaincodeDeploy(namespace string, fileEntries []*ccprovider.TarFileEntry) error
ProcessIndexesForChaincodeDeploy creates indexes for a specified namespace
func (*VersionedDB) ValidateKey ¶
func (vdb *VersionedDB) ValidateKey(key string) error
ValidateKey implements method in VersionedDB interface
func (*VersionedDB) ValidateKeyValue ¶
func (vdb *VersionedDB) ValidateKeyValue(key string, value []byte) error
ValidateKeyValue implements method in VersionedDB interface
type VersionedDBProvider ¶
type VersionedDBProvider struct {
// contains filtered or unexported fields
}
func NewVersionedDBProvider ¶
func NewVersionedDBProvider() (*VersionedDBProvider, error)
func (*VersionedDBProvider) Close ¶
func (provider *VersionedDBProvider) Close()
func (*VersionedDBProvider) GetDBHandle ¶
func (provider *VersionedDBProvider) GetDBHandle(dbName string) (statedb.VersionedDB, error)
TODO retry while get error