statedb

package
v0.0.0-...-95b87ed Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateRangeMetadata

func ValidateRangeMetadata(metadata map[string]interface{}) error

Types

type BulkOptimizable

type BulkOptimizable interface {
	LoadCommittedVersions(keys []*CompositeKey) error
	GetCachedVersion(namespace, key string) (*version.Height, bool)
	ClearCachedVersions()
}

type CompositeKey

type CompositeKey struct {
	Namespace string
	Key       string
}

type IndexCapable

type IndexCapable interface {
	GetDBType() string
	ProcessIndexesForChaincodeDeploy(namespace string, fileEntries []*ccprovider.TarFileEntry) error
}

type QueryResult

type QueryResult interface{}

type QueryResultsIterator

type QueryResultsIterator interface {
	ResultsIterator
	GetBookmarkAndClose() string
}

type ResultsIterator

type ResultsIterator interface {
	Next() (QueryResult, error)
	Close()
}

type UpdateBatch

type UpdateBatch struct {
	ContainsPostOrderWrites bool
	Updates                 map[string]*nsUpdates
}

func NewUpdateBatch

func NewUpdateBatch() *UpdateBatch

func (*UpdateBatch) Delete

func (batch *UpdateBatch) Delete(ns string, key string, version *version.Height)

func (*UpdateBatch) Exists

func (batch *UpdateBatch) Exists(ns string, key string) bool

func (*UpdateBatch) Get

func (batch *UpdateBatch) Get(ns string, key string) *VersionedValue

func (*UpdateBatch) GetRangeScanIterator

func (batch *UpdateBatch) GetRangeScanIterator(ns string, startKey string, endKey string) QueryResultsIterator

func (*UpdateBatch) GetUpdatedNamespaces

func (batch *UpdateBatch) GetUpdatedNamespaces() []string

func (*UpdateBatch) GetUpdates

func (batch *UpdateBatch) GetUpdates(ns string) map[string]*VersionedValue

func (*UpdateBatch) Merge

func (batch *UpdateBatch) Merge(toMerge *UpdateBatch)

func (*UpdateBatch) Put

func (batch *UpdateBatch) Put(ns string, key string, value []byte, version *version.Height)

func (*UpdateBatch) PutValAndMetadata

func (batch *UpdateBatch) PutValAndMetadata(ns string, key string, value []byte, metadata []byte, version *version.Height)

func (*UpdateBatch) Update

func (batch *UpdateBatch) Update(ns string, key string, vv *VersionedValue)

type VersionedDB

type VersionedDB interface {
	GetState(namespace string, key string) (*VersionedValue, error)

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

	GetStateMultipleKeys(namespace string, keys []string) ([]*VersionedValue, error)

	GetStateRangeScanIterator(namespace string, startKey string, endKey string) (ResultsIterator, error)

	GetStateRangeScanIteratorWithMetadata(namespace string, startKey string, endKey string, metadata map[string]interface{}) (QueryResultsIterator, error)

	ExecuteQuery(namespace, query string) (ResultsIterator, error)

	ExecuteQueryWithMetadata(namespace, query string, metadata map[string]interface{}) (QueryResultsIterator, error)

	ApplyUpdates(batch *UpdateBatch, height *version.Height) error

	GetLatestSavePoint() (*version.Height, error)

	ValidateKeyValue(key string, value []byte) error

	BytesKeySupported() bool

	Open() error

	Close()
}

type VersionedDBProvider

type VersionedDBProvider interface {
	GetDBHandle(id string) (VersionedDB, error)

	Close()
}

type VersionedKV

type VersionedKV struct {
	CompositeKey
	VersionedValue
}

type VersionedValue

type VersionedValue struct {
	Value    []byte
	Metadata []byte
	Version  *version.Height
}

func (*VersionedValue) IsDelete

func (vv *VersionedValue) IsDelete() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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