stateormdb

package
v0.0.0-...-7491e2d Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeVersionAndMetadata

func DecodeVersionAndMetadata(encodedstr string) (*version.Height, []byte, error)

Types

type SysState

type SysState struct {
	ID         string
	Value      []byte `gorm:"size:65535"`
	VerAndMeta string `json:"-"`
}

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

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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