statemongodb

package
v0.0.0-...-5fc7707 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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

func NewTestDBEnv(t testing.TB) *TestDBEnv

func (*TestDBEnv) Cleanup

func (env *TestDBEnv) Cleanup(dbName string)

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

func (vdb *VersionedDB) GetVersion(namespace string, key string) (*version.Height, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL