queryutil

package
v1.4.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QECombiner

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

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

GetState implements function in the interface ledger.SimpleQueryExecutor

func (*QECombiner) GetStateRangeScanIterator

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

GetStateRangeScanIterator implements function in the interface ledger.SimpleQueryExecutor

type QueryExecuter

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

QueryExecuter encapsulates query functions

type UpdateBatchBackedQueryExecuter

type UpdateBatchBackedQueryExecuter struct {
	UpdateBatch *statedb.UpdateBatch
}

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

func (*UpdateBatchBackedQueryExecuter) GetState

GetState implements function in interface 'queryExecuter'

func (*UpdateBatchBackedQueryExecuter) GetStateRangeScanIterator

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

GetStateRangeScanIterator implements function in interface 'queryExecuter'

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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