fabric: github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/queryutil Index | Files | Directories

package queryutil

import "github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/queryutil"

Index

Package Files

iterator_combiner.go query_executer_combiner.go

type QECombiner Uses

type QECombiner struct {
    QueryExecuters []QueryExecuter // actual executers in decending order of priority
}

QECombiner combines the query results from one or more underlying 'queryExecuters' In case, the same key is returned by multiple 'queryExecuters', the first 'queryExecuter' in the input is considered having the latest state of the key

func (*QECombiner) GetState Uses

func (c *QECombiner) GetState(namespace string, key string) ([]byte, error)

GetState implements function in the interface ledger.SimpleQueryExecutor

func (*QECombiner) GetStateRangeScanIterator Uses

func (c *QECombiner) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (commonledger.ResultsIterator, error)

GetStateRangeScanIterator implements function in the interface ledger.SimpleQueryExecutor

type QueryExecuter Uses

type QueryExecuter interface {
    GetState(namespace, key string) (*statedb.VersionedValue, error)
    GetStateRangeScanIterator(namespace, startKey, endKey string) (statedb.ResultsIterator, error)
}

QueryExecuter encapsulates query functions

type UpdateBatchBackedQueryExecuter Uses

type UpdateBatchBackedQueryExecuter struct {
    UpdateBatch *statedb.UpdateBatch
}

UpdateBatchBackedQueryExecuter wraps an update batch for providing functions in the interface 'queryExecuter'

func (*UpdateBatchBackedQueryExecuter) GetState Uses

func (qe *UpdateBatchBackedQueryExecuter) GetState(ns, key string) (*statedb.VersionedValue, error)

GetState implements function in interface 'queryExecuter'

func (*UpdateBatchBackedQueryExecuter) GetStateRangeScanIterator Uses

func (qe *UpdateBatchBackedQueryExecuter) GetStateRangeScanIterator(namespace, startKey, endKey string) (statedb.ResultsIterator, error)

GetStateRangeScanIterator implements function in interface 'queryExecuter'

Directories

PathSynopsis
mockCode generated by counterfeiter.

Package queryutil imports 5 packages (graph) and is imported by 2 packages. Updated 2019-10-17. Refresh now. Tools for package owners.